Explain Bundle.config In Asp.net mvc4 ?
Subin Thomas
Select an image from your device to upload
Bundling with MinificationMVC 4 introduced bundling and minification strategies to speed up request load time. Thanks to bundling, we can load several static files from the server with a single HTTP request.
MinificationMinification technique optimizes script or CSS file size by removing unnecessary white space and comments and shortening variable names to one character.
Bundle TypesMVC 5 includes following bundle classes in System.web.Optimization namespace:
ScriptBundle: ScriptBundle is responsible for JavaScript minification of single or multiple script files.
StyleBundle: StyleBundle is responsible for CSS minification of single or multiple style sheet files.
DynamicFolderBundle: Represents a Bundle object that ASP.NET creates from a folder that contains files of the same type.
In order to use Bundle.config in Asp.net MVC4, you will need to create a file called bundle.config in your nyt sudoku project’s root directory. This file contains the settings for your web application.
Bundle.config is a file created in default by MVC that is used to write the bundling code. When the individual request is sent to the server when the user references different files, there occurs unnecessary server overload. Bundling allows the developer to create a bundle of all the javascript and CSS files in the application. With this, all the files are fetched using a single request which improves the performance. Also, the bundles in the bundle.config files are minified. That is, all the extra space, the unnecessary comment is removed and scoped variable names are shortened to minimize the file size. Using the bundle and the minified files in the bundle.config files, it makes the job for a developer easy by referencing a set of files using a single request and thereby making the code clean and readable.