Condividi tramite


ASP.NET Bundling and Minification

I’m pleased to announce my new Bundling and Minification tutorial.  Bundling and Minification (B/M)  can significantly improve your first page hit download time – something that is very critical for mobile targeted applications.

B/M was introduced in ASP.NET 4.5 Beta, but the RC version has significant improvements. For a good overview of the changes between Beta and RC, see super PM Howard Dierking’s blog entry Web Optimization in Visual Studio 2012 RC.

Although this tutorial is specifically aimed at ASP.NET MVC 4, you can use B/M with Web Forms and Web Pages.

The RC version of B/M doesn’t work with Azure caching providers, but that has been fixed and the RTM version will work with Azure caching providers.

The ASP.NET B/M framework is contained in System.Web.Optimization namespace. There are other B/M frameworks such as Matt Wrock’s popular RequestReduce.

We haven’t stopped working on B/M. Let me know what features we should consider in the future.

In addition to blogging, I use Twitter to make quick posts and share links. My Twitter handle is: @RickAndMSFT

Comments

  • Anonymous
    June 13, 2012
    (no need to publish this comment) B/M... heh.

  • Anonymous
    June 14, 2012
    Hi Rick, I wonder if a feature like the one described here stackoverflow.com/.../a-localized-scriptbundle-solution in stackoverflow, would be possible through the ASP.NET B/M framework.   I would need to conditionaly devide which script to bundle depending on localization. Thanks

  • Anonymous
    June 15, 2012
    Hi Indice - Thanks for pointing out the SO question. Hao Kung (the lead developer on B/M) answered it.

  • Anonymous
    May 13, 2013
    Pardon, if very basic question - How do we add a Bundle.config to an MVC 4 web application? and where?