summaryrefslogtreecommitdiff
path: root/examples/portfolio/src
diff options
context:
space:
mode:
authorGravatar Rychardt Rothwërkz <redwerkz@users.noreply.github.com> 2022-06-28 14:50:27 +0200
committerGravatar Fred K. Schott <fkschott@gmail.com> 2022-06-28 10:13:06 -0700
commit0cf0b2e2d041c4be1a04c8416800e391d27ce81c (patch)
treeeed3955092a7c88cdbd73a7c34c90795f195a03c /examples/portfolio/src
parentbe3c99316a0fec537e7d84ba93e8212a4a3e1e04 (diff)
downloadastro-0cf0b2e2d041c4be1a04c8416800e391d27ce81c.tar.gz
astro-0cf0b2e2d041c4be1a04c8416800e391d27ce81c.tar.zst
astro-0cf0b2e2d041c4be1a04c8416800e391d27ce81c.zip
improve performance by adding another preconnect (#3737)
* improve performance by adding another preconnect This is the code Google Fonts officially provides. The reason for adding a secound url is that the link: https://fonts.googleapis.com/css2?family=Inter:wght@100&display=swap lists src urls like this: @font-face { font-family: 'Inter'; font-style: normal; font-weight: 100; font-display: swap; src: url(https://fonts.gstatic.com/s/inter/v11/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyeAZ9hiA.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } so for better performance both urls needs to be preconnected. * Update examples/portfolio/src/components/MainHead.astro Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Diffstat (limited to 'examples/portfolio/src')
-rw-r--r--examples/portfolio/src/components/MainHead.astro3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/portfolio/src/components/MainHead.astro b/examples/portfolio/src/components/MainHead.astro
index 978c1d245..935923060 100644
--- a/examples/portfolio/src/components/MainHead.astro
+++ b/examples/portfolio/src/components/MainHead.astro
@@ -9,5 +9,6 @@ const { title = 'Jeanine White: Personal Site', description = 'The personal site
<title>{title}</title>
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
-<link rel="preconnect" href="https://fonts.gstatic.com" />
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@200;400;700;900&display=swap" rel="stylesheet" />