Skip to content

Commit 0cf0b2e

Browse files
Rychardt Rothwërkznatemoo-re
authored andcommitted
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 <[email protected]>
1 parent be3c993 commit 0cf0b2e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/portfolio/src/components/MainHead.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ const { title = 'Jeanine White: Personal Site', description = 'The personal site
99
<title>{title}</title>
1010

1111
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
12-
<link rel="preconnect" href="https://fonts.gstatic.com" />
12+
<link rel="preconnect" href="https://fonts.googleapis.com">
13+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
1314
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@200;400;700;900&display=swap" rel="stylesheet" />

0 commit comments

Comments
 (0)