Http://jingyan.baidu.com/article/148a192178ec834d71c3b12b.html steps
This article describes the method of HTTP compression, the use of Windows system settings, the advantage is high efficiency.
I. HTTP compression overview HTTP compression is a way to transfer compressed text content between a Web server and a browser. HTTP compression uses a common compression algorithm such as gzip to compress HTML, JavaScript, or CSS files. The greatest benefit of compression is to reduce the amount of data transmitted over the network, thereby increasing the access speed of the client browser. Of course, it will also increase the burden of a little server. Gzip is a more common type of HTTP compression algorithm.
Two. How HTTP compression works the Web server works with HTTP compression as follows:
After the Web server receives the browser's HTTP request, check to see if the browser supports HTTP compression;
If the browser supports HTTP compression, the Web server checks the suffix name of the requested file;
If the request file is an HTML, CSS and other static files, the Web server to the compression buffer directory to check whether the requested file has the latest compressed file;
If the compressed file of the requested file does not exist, the Web server returns the uncompressed request file to the browser and stores the compressed file of the requested file in the compressed buffer directory;
If the most recent compressed file of the requested file already exists, the compressed file of the requested file is returned directly;
If the request file is a dynamic file such as ASPX, the Web server dynamically compresses the content and returns to the browser, and the compressed content is not stored in the compressed cache directory.
Three. Steps to configure HTTP gzip compression in IIS 6.0 the prominent advantage of enabling gzip over Windows2003 system setup is that it is efficient, so we set up IIS directly to allow it to support gzip compression. The steps to enable gzip compression are as follows.
1. Click Start-Administrative Tools-Internet Information Services (IIS) Manager to open IIS Manager;
2. In IIS Manager, open the Web Site > Properties dialog box, switch to the Services tab, select Compress application files and compress static files, and set the maximum capacity of the temporary directory as appropriate, initially limiting to around 1G. 1 is shown below:
3. Return to Internet Information Services (IIS) Manager, right-click Web Service Extensions, select Add a new Web service extension (a), enter the extension "Gzip" in the "new Web service Extension" box, and add "required files" to C:\WINDOWS\ System32\inetsrv\gzip.dll, where the Windows system directory may vary depending on your installation, and also select "Set extended status to allow". 2 is shown below:
4, use Notepad and other text editor to open C:\Windows\System32\inetsrv\MetaBase.xml, find "IIsCompressionScheme", according to the following methods to modify, save. (Backup is recommended before modification)
If you need to compress dynamic files, set HcDoDynamicCompression to "TRUE" and add the dynamic file suffix names you want to compress in hcscriptfileextensions, such as ASPX, PHP, JSP, and so on.
If you need to compress the static files, set HcDoStaticCompression and HcDoOnDemandCompression to "TRUE" and add the static file suffix names that you need to compress in hcfileextensions, such as shtm, Static file types such as shtml, JS, CSS, SWF, Mid, XML, MP3, and so on. 3 is shown below:
Among them, HcDynamicCompressionLevel and hcondemandcomplevel represent the required compression ratio, and the smaller the number (0~9) The lower the compression rate.
5. Enter "net stop iisadmin/y" to stop the IIS service and save MetaBase.xml after running.
6. Restart the IIS service by entering "IISReset" in the run.
At this point, Windows2003 server IIS enables gzip compression to complete.
Reference http://www.zhengzhousem.com/news.asp?id=5
From for notes (Wiz)
WINDOWS2003 Server IIS enables gzip compression settings