Skip to content

Commit

Permalink
[docs] Preconnect to load the fonts (mui#12113)
Browse files Browse the repository at this point in the history
Should provide a small perf boost
  • Loading branch information
oliviertassinari authored and Joe Shelby committed Jul 14, 2018
1 parent 61eca44 commit 3f8bab8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ class MyDocument extends Document {
return (
<html lang="en" dir="ltr">
<Head>
{/*
Preconnect allows the browser to setup early connections before an HTTP request
is actually sent to the server.
This includes DNS lookups, TLS negotiations, TCP handshakes.
*/}
<link href="https://fonts.gstatic.com" rel="preconnect" crossOrigin="true" />
{/* Use minimum-scale=1 to enable GPU rasterization */}
<meta
name="viewport"
Expand Down

0 comments on commit 3f8bab8

Please sign in to comment.