I was curious, so I set up some test pages to see.
If your site only needs HTML5Shiv with PrintShiv from modernizr, then downloading only html5shiv-printshiv.js using IE conditional will work better and then always download modernizr for all other browsers (lt IE 9). Therefore, in your case, you should probably stop using modernizr and just use shiv in the conditional expression.
For IE browsers requiring shivs, load / performance is equal between using modernizr and only html5shiv. Performance gains for html5shiv-only use are only seen in modern IE browsers (IE9 and IE10).
Testing Pages:
Testing Protocols Using IE9 / Cable:
Comparing these tests, fully loaded, we save 1.677 seconds using html5shiv-printshiv.js
Update Modernizr . Read the Performance Consideration Documents compiled on the Modernizr GitHub project ticket for more details.
source share