The modern browsers IE6 and Firefox both support the client gzip. That is to say, before the webpage on the server is transmitted, Gzip compression is used before it is transmitted to the client. After receiving the webpage, the client is decompressed and displayed by the browser, in this way, although the CPU usage of some servers and clients is slightly occupied, the bandwidth utilization is higher. For plain text, the compression ratio is considerable. If each user saves 50% of the bandwidth, the bandwidth you lease will be able to serve customers more than doubled. 2. This function is integrated in iis6.0, but does not provide a good interface for operations.
L first, if you need to compress static files (HTML), you need to create a directory on the hard disk and give it the write permission of the user "IUSR _ machine name. 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.
L add the gzip Web Service Extension and set it to valid
L set effective website Compression
Go to the "service" tab and choose to enable dynamic content compression and static content compression.
Restart IIS and the compression takes effect. However, the compressed file format is too small by default. You can set it further.
L modify metabase. xml. Backup is recommended first.
You can open it in notepad and find the iiscompressionscheme. There are three segments with the same name: deflate, Gzip, and parameters. The third segment does not need to be ignored. The first two segments have basically the same parameters.
Hcdynamiccompressionlevel: sets the compression rate. The value ranges from 0 ~ 10, 0 do not compress, 10 the highest compression rate, here set to 9, 9 is the most cost-effective.
Hcfileextensions: the extension of the static file to be compressed. By default, only htm, HTML, and TXT files are supported. You can add JS and CSS files. We recommend that you use line breaks as the separator based on the original format. Hcscriptfileextensions: the dynamic file extension to be compressed. Add aspx here.
Location = "/lm/w3svc/filters/compression/deflate" Settings
Location = "/lm/w3svc/filters/compression/gzip" Settings
L iisreset-Stop stop IIS and save metabase. xml
L iisreset-start IIS