Monday, September 30, 2013

Bundling in visual studio 2012 for web optimization

As we know now days web applications or site are providing more and more features and due to that we have include lots of JavaScript and CSS files in our web application.So once we load site then we will have all the JavaScript  js files and CSS files loaded in the browsers and If you have lots of JavaScript files then its consumes lots of time when browser request them.
Following images show the same situation over there.

Bundling feature in Visual Studio 2012 - Visual Studio 2012 feature series

Here you can see total 25 files loaded into the system and it's almost more than 1MB of total size. As we need to have our web application of site very responsive and need to have high performance application/site, this will be a performance bottleneck to our site. In situation like this, the bundling feature of Visual Studio 2012 and ASP.NET 4.5 comes very handy. With the help of this feature we do optimization there and we can increase performance of our application.


To enable this feature in Visual Studio 2012 we just made debug=”false” in web.config of our application like following.

How to enable bundling in Visual Studio 2012

Now once you enable this feature and run this application in the browser to see your traffic it will have less items like following.

AfterBudnlingenabledinVisualStudio2012

No comments:

Post a Comment

Thank you for visiting my blog

Kubernetes

Prerequisites We assume anyone who wants to understand Kubernetes should have an understating of how the Docker works, how the Docker images...