Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Only preload .woff2 font files #4728

Merged
merged 1 commit into from Apr 3, 2018
Merged

Conversation

alexgibson
Copy link
Contributor

I currently have a few pages of MDN listed on the performance dashboard I'm building for our team. Because I'm spending a fair bit of time looking at this, I was intrigued to see a noticable up-tick in both load times and bytes in, as you can see here:

screenshot-2018-4-3 web performance dashboard

After a bit of digging in the web page test result, I noticed that both .woff and .woff2 files are being loaded, which seemed like a bug:

screenshot-2018-4-3 webpagetest test details - california dev mozilla org en-us - 04 03 18 03 25 41

I think this PR should fix the issue because:

  • Any browser that supports .woff2 should no longer need .woff files.
  • Any browser that supports rel="preload" should also support .woff2.

Copy link

@schalkneethling schalkneethling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes a lot of sense. Thanks @alexgibson

@schalkneethling schalkneethling merged commit ed36a7c into mdn:master Apr 3, 2018
@alexgibson alexgibson deleted the font-preload branch April 3, 2018 14:29
@alexgibson
Copy link
Contributor Author

Looks like it worked, thanks @schalkneethling 👍

screenshot-2018-4-6 web performance dashboard

(my first contribution to MDN 🍻)

@schalkneethling
Copy link

schalkneethling commented Apr 6, 2018 via email

@escattone
Copy link
Contributor

Nice, thanks @alexgibson!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants