3/24/2024 0 Comments Mvc net bundle and minify js files![]() ![]() ![]() ![]() In this snapshot when the user is accessing the website from the server, we are using asp.net mvc bundling for request that’s why only a single request is made to the server, and multiple files get a return. In this snapshot when the User is accessing the website from the server, the number of requests is made to get files from the server. In asp.net MVC bundling is used for grouping multiple script and styles such that it can be rendered in one single request from the server. To solve this problem, Microsoft has come up with new features, Bundling, and Minification in MVC. This same process will be carried out for script too for that also more than 4 requests will send to get this script so total more than 8 hits on the server for getting only styles and script will sure affect load time. it has sent more than 4 requests to getting all CSS files to render. After that, it will send a request to get CSS for Image popup gallery after that, main site CSS, last for webcam, etc. When we try to browse a website, it will send an HTTP request to the server to get a single CSS file for the date picker. by adding these many references on page think how much time will it take to load a simple page. same way we use CSS file references like one for the date picker, different CSS for Image Popup and last for webcam, etc. There are many Script files like one for the date picker, other for Image Popup, if use webcam in your application then we also need to add reference JavaScript of Webcam to on the page, etc. While working in ASP.NET Webforms, we use the Master page to apply common design to all the pages in that we also use to add our Script reference and CSS reference to the page. This feature helps us to reduce the Overall Load time of the Website. Let’s start with Understanding New Feature in MVC 4 is Bundling and Minification. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |