IIS 8 turns on gzip compression to reduce the consumption of network requests

Source: Internet
Author: User
What is gzip

GZIP is the acronym for GUNZIP, the earliest file compression applied to UNIX systems. The gzip encoding on the HTTP protocol is a technique used to improve the performance of Web applications, and both the Web server side and the client must support gzip. The current mainstream browsers support the protocol, and common server Apache,nginx,iis also support gzip.
Gzip reduces the bandwidth of the server by replacing compression with a similar portion of the file, which is usually around 3 to 10 times times the compression ratio. In practical applications, we mainly compress the static files such as. Js,.css,.json.
So how does the client and the server communicate to support gzip? First, when the client sends an HTTP request, it takes the request header accept-encoding and sets its value to gzip. Indicates that the browser supports gzip. After receiving the request, the server determines whether the browser supports gzip, and if so, sends the compressed content to the browser or sends the uncompressed content. Typically, both the server side and the browser support gzip. The contents returned by the response header contain content-encoding:gzip.

After the browser receives a response from the server, it determines whether the response is compressed. If it is compressed, unzip and then show the content.

the principle is shown in the following illustration:
how to turn on gzip in IIS

Our server here uses Windows Server, and the IIS version is v8.5.
First, open IIS Manager, navigate to the appropriate site, select the function view, click Compress.

If prompted for dynamic content compression is not installed, open Server Manager, click Management, select Add roles and features.


Tick server Roles > Web server > Performance > Dynamic content compression. For installation.
After installation, click on the server interface, click the Configuration Editor.

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.