This article is a mirror article of machine translation, please click here to jump to the original article.

View: 21086|Reply: 1

[Source] System.Web.Optimization merges the use of compression techniques

[Copy link]
Posted on 3/17/2017 2:28:29 PM | | | |
The principle of bundling and compression is to dynamically merge and compress multiple CSS files into one CSS file, and multiple JS files to be dynamically merged and compressed into one JS file, so as to reduce the number of browser requests to server resource files, reduce the size of resource files and improve the response speed of the page. ASP.NET 4.5 and above support this technology (Optimization).


How to use:

    First nuget download the package Microsoft.AspNet.Web.Optimization, and then configure it as follows:

    Step 1: As usual, create a new class under the App_start folder, as shown in the figure:


      

  


   Here is a parameter "BundleTable.EnableOptimizations":

If this is not set, System.Web.Optimization uses the default policy,

atDebug modeNot enabledMerge and compression.

atRelease modeEnableMerge and compression.

If set, the default policy will be overridden;









Previous:Warning "Unresolved conflicts found between different versions of the same dependent assembly"
Next:VisualSVN Server Configuration and Usage (Project Deployment on SVN)
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com