Bundle and Minify CSS/JS using ClientDependency in Umbraco 6 MVC/Razor
- by:
- in:
- tags: ASP.NET MVC, ClientDependency, Razor, Umbraco 6
This is going to be a short post on how to configure style sheets and JavaScript's bundling and minification in Umbraco 6 using ClientDependency framework in MVC. The benefits of bundling and minification are obvious as they reduce the number of HTTP requests as well as decrease the download size of resources to the browser resulting in a faster browsing experience. While Microsoft has prebuilt its own libraries to enable these features, Umbraco uses the ClientDependency framework to achieve the same. You can read more about the client dependency framework from its codeplex website, its got quite a few configurations options and you and read more about them on its website. In this post I am just going to focus on getting an initial configuration up and running since there seems to be lack of clear documentation on the topic and it took me a while too to figure how to set it up correctly. This article assumes that you already have a installation of Umbraco 6 and have configured its rendering engine to use ASP.NET MVC for the pages.
Continue Reading