Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Self host fonts #21
Been working on a little side project to push google fonts to npm to make it really easy to self-host fonts. This makes for a nice little speed index boost as it avoids the extra ssl negotiation to google fonts + the extra round trip to first grab their css file and then download the fonts. Instead the fontface css is embedded directly in the
I also used the new link preload fetch directive (only supported on chrome atm) which instructs the browser to immediately start downloading the font file (normally browsers wait to see if the font is actually used in the html on the page before downloading).
Speed index savings seem around ~300 milliseconds on desktop/cable & ~1.5 seconds on smartphone/3g.
I also switched the various icons to use file-loader vs. the default url-loader as currently we're base64 encoding icons in the HTML which is wasted bytes.