Virtual Classes Logo          Virtual Classes
    Read Anytime,Anywhere

Bundling In MVC

A bundle is a logical group of files that is loaded with a single HTTP request.
By loading all the required Script and Stype file performace of processing request can be improved. You can create style bundle for css and script bundle for javascripts files in RegisterBundles method of BundleConfig class.
All bundles are registered in Application_Start method of Global.asax.
Below example shows registering of Bundles.

Bundling In MVC

If you want to see the differnce in performance.
Open developer tool and click network tab and then refresh your page.
If you are not using bundling feature then browser makes request for every file needed to render page, but if you are using bundling feature then it make a single.