Minification performs a variety of different code optimizations to scripts or css, such as removing unnecessary white space and comments and shortening variable names to one character. The following image shows the same timing view of the About view shown previously, but this time with bundling and minification enabled. Fewer files means fewer HTTP requests and that can improve first page load performance. You can create CSS, JavaScript and other bundles. Bundlingīundling is a new feature in ASP.NET 4.5 that makes it easy to combine or bundle multiple files into a single file. In this case, the request was queued for 46 milliseconds waiting for another request to complete. The preceding image shows the Start event, which gives the time the request was queued because of the browser limit the number of simultaneous connections. For example, the following image shows the timing details for loading the /Scripts/MyScripts/JavaScript6.js file. You can double-click on an asset to get detailed timing information. The blue bars show the time taken to receive the response data from the server. The yellow bar is the request time to first byte, that is, the time taken to send the request and receive the first response from the server. The gray bars show the time the request is queued by the browser waiting on the six connection limit. In the image below, the IE F12 developer tools network tabs shows the timing for assets required by the About view of a sample application. That means that while six requests are being processed, additional requests for assets on a host will be queued by the browser. Most of the current major browsers limit the number of simultaneous connections per each hostname to six. Bundling and minification improves load time by reducing the number of requests to the server and reducing the size of requested assets (such as CSS and JavaScript.) Bundling and minification are two techniques you can use in ASP.NET 4.5 to improve request load time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |