Gzip compression efficiency is very high, usually can achieve 70% compression ratio, that is, if your Web page has 30K, compression after the turn into 9K or so.
First step: Open IIS, enable HTTP compression service
Right-click Site, properties, and select Services. Select "Compress application Files" and "Compress static files" in the "HTTP Compression" box, set "Temp directory" and "Maximum limit of temporary directory" as required;
Step two: Enable Web services
Step Three: Modify MetaBase.xml
Start > Run input c:\windows\system32\inetsrv, find MetaBase.xml, first back up, in modify. (Some servers do not need to modify this file to be used)
Search location = "/lm/w3svc/filters/compression/gzip"
Carefully check the code:
<iiscompressionscheme location = "/lm/w3svc/filters/compression/deflate"Hccompressiondll= "%windir%\system32\inetsrv\gzip.dll"HcCreateFlags= "0"HcDoDynamicCompression= "TRUE"HcDoOnDemandCompression= "TRUE"HcDoStaticCompression= "FALSE"HcDynamicCompressionLevel= "0"hcfileextensions="htm HTML txt"HcOnDemandCompLevel= "10"hcpriority= "1"hcscriptfileextensions="ASP dll exe" > </IIsCompressionScheme> <iiscompressionscheme location = "/lm/w3svc/filters/compression/gzip"Hccompressiondll= "%windir%\system32\inetsrv\gzip.dll"HcCreateFlags= "1"HcDoDynamicCompression= "TRUE"HcDoOnDemandCompression= "TRUE"HcDoStaticCompression= "TRUE"HcDynamicCompressionLevel= "0"hcfileextensions="htm HTML txt"HcOnDemandCompLevel= "10"hcpriority= "1"hcscriptfileextensions="ASP dll exe" > </IIsCompressionScheme>
Replace with:
<iiscompressionscheme location = "/lm/w3svc/filters/compression/gzip"Hccompressiondll= "%windir%\system32\inetsrv\gzip.dll"HcCreateFlags= "1"HcDoDynamicCompression= "TRUE"HcDoOnDemandCompression= "TRUE"HcDoStaticCompression= "TRUE"HcDynamicCompressionLevel= "10"hcfileextensions="html css js htm XML txt"HcOnDemandCompLevel= "10"hcpriority= "1"hcscriptfileextensions="PHP DLL" > </IIsCompressionScheme> <iiscompressionscheme location = "/lm/w3svc/filters/compression/deflate"Hccompressiondll= "%windir%\system32\inetsrv\gzip.dll"HcCreateFlags= "2"HcDoDynamicCompression= "TRUE"HcDoOnDemandCompression= "TRUE"HcDoStaticCompression= "TRUE"HcDynamicCompressionLevel= "10"hcfileextensions="html css js htm XML txt"HcOnDemandCompLevel= "10"hcpriority= "1"hcscriptfileextensions="PHP DLL" > </IIsCompressionScheme>
After you modify it, stop the IIS Admin Services service in the service
Then, after saving the Metebase.xml, save it and start IIS again. This enables the GZIP compression to be enabled successfully.
Finally, test gzip compression is successful, you can go to Webmaster Tools http://tool.chinaz.com/Gzips/to detect.
Tips:
This article is only demonstrated on the Windows IIS server, VPS host, standalone server can be implemented, virtual host users need to consult the space quotient (General virtual host is enabled gzip) If your station has difficulty in enabling gzip compression, you can comment and communicate here, I will try my best to answer for you.
Web pages enable gzip compression to improve browsing speed