Asp.net MVC Tutorials explains the Bundling and minification is a technique to improve the request load time and introduced in asp.net MVC 4. bundlings has some following bundle classes in System.Web.Optimization namespace.
the above bundles are included in MVC 5 and the namespace is System.Web.Optimization.Bundle.
it is a process of grouping the CSS/javascript files.
the most important of bundling is to reduce the number of request from the browsers to the server, while minification reduces the size of requested assets.
Minification reduces the unnecessary white spaces and comments
Without Minification :
allTechGeeks =function(city){
//this is comment
var test = "Hello World" + city ;
alert(test) ;
}
in without minification, the javascript file has spaces and comments but after minification, we can't find the spaces and comments. So automatically the size of the file reduces but for development needs the without minification. in production minification file is good.
- ScriptBundle
- StyleBundle
- DynamicFolderBundle
the above bundles are included in MVC 5 and the namespace is System.Web.Optimization.Bundle.
it is a process of grouping the CSS/javascript files.
the most important of bundling is to reduce the number of request from the browsers to the server, while minification reduces the size of requested assets.
Minification reduces the unnecessary white spaces and comments
Without Minification :
allTechGeeks =function(city){
//this is comment
var test = "Hello World" + city ;
alert(test) ;
}
After Minification :allTechGeeks =function(city){var test = "Hello World" + city ;alert(test) ;}
in without minification, the javascript file has spaces and comments but after minification, we can't find the spaces and comments. So automatically the size of the file reduces but for development needs the without minification. in production minification file is good.
Asp.Net MVC - Get Started |
---|
|
Post a Comment (0)