The ASP.NET MVC template drops a copy of Modernizr 1.7 in your project automatically, and if you check for NuGet updates the library is brought up to the current version - 2.5.3.
The NuGet package is a a great way to introduce developers to Modernizr and makes checks for updates easy. But when adding Modernizr to your projects consider two alternatives:
Alternative One – Content Delivery Network:
Microsoft CDN currently hosts two Modernizr versions – 1.7 and 2.0.6. By using a CDN copy you increase the chance that your customers will already have a browser-cached version of the library.
There are some negatives to this approach though. MS is not hosting the newest version of the library (2.5.3), and despite the fact that Microsoft has a highly reliable CDN the potential for outage will always be higher when your site relies on multiple web sites.
You can help resolve this last issue by using the pattern that HTML5Boilerplate employs to load jQuery: start by loading the CDN version, but use a local copy if the CDN load failed:
<script>window.Modernizr || document.write('<script src="Scripts/modernizr-1.7.js"><\/script>')</script>
There are potential caching benefits with the CDN route, but the Modernizr team has gone out of their way to endorse the customized download option (http://www.modernizr.com/news/modernizr-and-cdns).
For instance if you create a custom download of Modernizr including the first 5 HTML checks with HTML5shiv and the “add CSS” function the file is 4144 characters. By comparison the default Modernizr 2.5.3 NuGet file is 49,397 characters.