-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
Move Modernizr to the bottom #1605
Comments
I agree that loading scripts at the bottom is mostly better, but html5shiv is included with modernizr, so in older browsers the page might render wrong when modernizr is loaded at the bottom? |
|
@bartveneman True. I agree. Once the support for ie8 is dropped, do we still need html5shiv? (#1524) |
+1. People can always move it back to the head in those cases where it's needed / justified, but it's better to present them with the best possible scenario. |
@paulirish, @patrickkettner Care to open a PR that makes the change and also updates the docs? :) |
Why isnt this merged |
@emoju: |
I would like to work on the PR & Docs but don't have the time to. We need to communicate this on the modernizr side primarily. I'd welcome any help with the communication -- basically we need a revision of my article/comment that we publish to help transition existing users to more responsible use of it and justify the change in recommendation. |
@paulirish I'm through the book grind, so I've got some time to help out with documentation. Let me know what you need. |
Has anybody tried this out on real sites yet? What patterns are most likely to make a site fall into the 25%? |
@austinpray relying on modernizr for styling/creating the above the fold content |
We will test this within the next couple of weeks in a large scale project. I will provide the results if possible. |
thanks @drublic Would be interested to hear results. |
@drublic Do you already have (some?) results? |
We don't have a lot of numbers from our production websites yet but here are some test numbers: We now load html5shiv in The change saves us in The saved data moves to This means we save bytes (because of how gzip works) and deliver the first view faster. |
ayo, I merged in code that does this 💯 |
It has more potential to introduce unexpected situations, however it's much better for the user to just have no scripts up in the head at all.
Guide to Using Modernizr responsibly.
I bet >75% of sites dont need it in the head. I'd rather change this default and educate the 25% than watch as we slow down all these sites.
The text was updated successfully, but these errors were encountered: