Enable IIS gzip compression on Windows Server

Source: Internet
Author: User

It is not required to compress dynamic files (PHP, ASP, and aspx), because the pages are dynamically generated every time, so you can discard them after compression. In the IIS manager, right-click the website and choose "properties". The website is not the following site, but the whole website. Go to the "service" tab and choose to enable dynamic content compression and static content compression.

Select the Server Extension under the website and create a new server extension. The name does not matter. The path of the file to be added below is:

C: \ windows \ system32 \ inetsrv \ gzip. dll and enable this extension.

Static content can be compressed at this time, but for dynamic content, the aspx file is not within the compression range. Because the default file that can be compressed does not have this extension. On the management interface, you cannot find a place where the extension can be added. At this time, you can only modify its configuration file.

There is a metabase under c: \ windows \ system32 \ inetsrv. XML file. You can open it in notepad and find the iiscompressionscheme. There are three segments with the same name, namely deflate, Gzip, and parameters. You do not need to worry about the third segment, the first two paragraphs have basically the same parameters. Add a line of aspx under the parameters hcscriptfileextensions. If you have other dynamicProgramCompression is also added here. Change hcdynamiccompressionlevel to 9 (0-10, 9 is the most cost-effective ).

Then you need to restart the IIS service to realize the compression speed.

However, it may not be too obvious. The CPU usage in the whole process is basically invisible.

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.