1. What is gzip?
Gzip was first created by Jean-Loup gailly and Mark Adler for File compression in UNIX systems. We often use files suffixed with .gz in linux, which are in GZIP format. Nowadays, it has become a widely used data compression format on the Internet, or a file format. Gzip encoding on HTTP is a technology used to improve the performance of Web applications. Large-Traffic web sites often use gzip compression technology to make users feel faster. (Above from Baidu encyclopedia http://baike.baidu.com/view/966625.htm)
HTTP/1.1 allows the client to download compressed content from the server. This standard defines two compression methods: "gzip" (the content is encapsulated using gzip data streams) and "deflate" (the content is the original format and the deflate data stream without data headers ). Many HTTP client libraries and most browsers today support these two formats. (From http://zh.wikipedia.org/zh-cn/Gzip)
Ii. Why gzip?
Gzip can compress the file size to reduce the traffic during transmission. For example, a K file is reduced to 20 K, which is equivalent to KB of traffic before the same file, now we only need 1/5. At the same time, the transmission speed is also improved, but the file server is compressed, and the decompression on the client consumes CPU. The biggest advantage of compression is to reduce the amount of data transmitted over the network, this increases the access speed of the client browser.
3. How to configure gzip in IIS
1. Enable Compression
Open iis6.0 website --- anti-Key Attribute ---- Service
2. Add new web service items
Add a required file c: \ windows \ system32 \ inetsrv \ gzip. dll, set the extension status to allow, and click OK.
Open c: \ windows \ system32 \ inetsrv \ metabase in the text editor. XML (backup is recommended), search for hcscriptfileextensions in the file, and set the suffix of the file to be compressed. asp, DLL, and exe are used by default, and aspx is added according to the format, search for hcfileextensions and add static file formats such as JS, CSS, and XML. If the file cannot be saved because IIS uses this file, stop the IIS service.
IIS Optimization on Windows2003 server: gzip compression Enabled
After the configuration is complete, create a single index.htm page with a file size of 7.8 kb. Open the page on ff, with only 2 kb