Monday, 18 January 2016

Bundling and Minification in asp.net MVC

Bundling and Minification techniques reduce the number of request to the server and size of requested CSS and JavaScript library,which improve page loading time.

Bundling reduces the number of individual HTTP request to server by combining multiple CSS files and JavaScript files into single CSS file and JavaScript file.

Minification reduces the file download size of CSS and JavaScript files by removing white space,comments and other unnecessary characters.

Advantage of Bundling :
=====================
Bundling and Minification primarily improve the first page request load time.
Once a web page has been requested,the browser caches the assets(JavaScript ,CSS and images).
So bundling and Minification won't provide any performance boost when requesting the same
page,or pages on the same site requesting the same assets.

Note :
In debug mode bundling is switched off by default.To enable bundling in debug-mode

BundleTable.EnableOptimizations=true;

No comments:

Post a Comment