How to perform IIS Compression

Source: Internet
Author: User

We are going to learn about IIS compression today. In fact, IIS compression is not a new technology, but for SharePoint sites, IIS compression can play a major role. Next, let's learn about this.

After the IIS compression function is enabled on the IIS server, before the IIS server sends the page content to the browser, It compresses the content on the server and then sends the compressed data, after the browser receives the data, it automatically decompress it and then displays it. Because the data transmitted over the network is compressed, the page content can be transmitted to the browser faster to improve the page browsing speed.

Although it takes some CPU time to compress the page content on the IIS server, this does not cause any problems for the CPU of mainstream servers. In addition, the CPU time is too low compared with the data transmission time saved. After a page is compressed each time, IIS caches the compressed files to the disk to avoid repeated compression next time.

Enabling IIS compression on the IIS server can be done through the IIS manager on the GUI, but some configurations cannot be done only through the IIS manager, we use a script tool of IIS for all management and configuration. The following commands must be executed at the command prompt on the server.

Enable IIS compression on iisserver:
 

 
 
  1. cscript C:\Inetpub\adminscripts\adsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true 

Enable dynamic files such as. asp on the IIS server) IIS compression:
 

 
 
  1. cscript C:\Inetpub\adminscripts\adsutil.vbs set w3svc/filters/compression/parameters/HcDoDynamicCompression true 

Add the ". aspx" file type to dynamic file IIS compression. All pages of the SharePoint site are. aspx). Run the following two commands:
 

 
 
  1. cscript C:\Inetpub\adminscripts\adsutil.vbs SET W3SVC/Filters/Compression/Deflate/HcScriptFileExtensions "asp" "dll" "exe" "aspx"  
  2. cscript C:\Inetpub\adminscripts\adsutil.vbs SET W3SVC/Filters/Compression/gzip/HcScriptFileExtensions "asp" "dll" "exe" "aspx" 

Increase the default IIS compression ratio by using two commands:
 

 
 
  1. cscript C:\Inetpub\adminscripts\adsutil.vbs SET W3Svc/Filters/Compression/GZIP/HcDynamicCompressionLevel "9"  
  2. cscript C:\Inetpub\adminscripts\adsutil.vbs SET W3Svc/Filters/Compression/DEFLATE/HcDynamicCompressionLevel "9" 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.