Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only preload .woff2 font files #4728

Merged
merged 1 commit into from Apr 3, 2018

Conversation

Projects
None yet
3 participants
@alexgibson
Copy link
Member

alexgibson commented Apr 3, 2018

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.

@jwhitlock jwhitlock requested a review from schalkneethling Apr 3, 2018

@schalkneethling
Copy link
Collaborator

schalkneethling left a comment

That makes a lot of sense. Thanks @alexgibson

@schalkneethling schalkneethling merged commit ed36a7c into mozilla:master Apr 3, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@alexgibson alexgibson deleted the alexgibson:font-preload branch Apr 3, 2018

@alexgibson

This comment has been minimized.

Copy link
Member Author

alexgibson commented Apr 6, 2018

Looks like it worked, thanks @schalkneethling 👍

screenshot-2018-4-6 web performance dashboard

(my first contribution to MDN 🍻)

@schalkneethling

This comment has been minimized.

Copy link
Collaborator

schalkneethling commented Apr 6, 2018

@escattone

This comment has been minimized.

Copy link
Member

escattone commented Apr 6, 2018

Nice, thanks @alexgibson!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.