Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm using an HTML5 template that makes thorough use of the semantic tags and includes Modernizr up top to do the necessary IE coaxing. Google PageSpeed is complaining about the blocking JavaScript and recommending a deferred load, but as I understand it Modernizr has to load first to prevent IE from choking. Is PageSpeed wrong about this particular item, or can I push the Modernizr load down to the bottom of the page?

share|improve this question
    
Why don't you try to put the loading of the script at the end of the page to make happy Page Speed and see if it even though fixes IE oddities? –  Zistoloen Jan 17 at 8:41
add comment

1 Answer

From Modernizr installation page:

Drop the script tags in the HEAD of your HTML. For best performance, you should have them follow after your stylesheet references. The reason we recommend placing Modernizr in the head is two-fold: the HTML5 Shiv (that enables HTML5 elements in IE) must execute before the BODY, and if you’re using any of the CSS classes that Modernizr adds, you’ll want to prevent a FOUC.

Modernizr is pretty fast and lean, especially if you have used their customizer to trim out the features you don't need to use

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.