Enable IIS6 GZIP, improve website open speed

  
IIS6 does not enable GZIP function by default, we need to manually configure, but he did not provide graphical configuration function, so, technical personnel like me have not considered using him Yesterday I suddenly saw this thought, maybe it was useful to me, but looking for it from the Internet, it is a bunch of manual methods, very troublesome, but I have studied the configuration file of IIS before: C:\\WINDOWS\\system32\\inetsrv\\ MetaBase.xml, so, I know that as long as it is the function of IIS, you can modify this file to complete it. So, let's start with this file. Search for a circle on the Internet and find a place according to the modification provided online. Something like ClickOnce, huh, I am looking for this, all the operations are in place, as long as the implementation of a VBS or CMD is configured, huh, huh.

Using Gzip compression will increase the CPU usage of the server but can reduce the data sent by the server to the client through compression. If Gzip is used, IIS will automatically detect when sending data to the client, if the client browser Support IE6.0, firefox Gzip, then use Gzip compression to transfer data, if not supported, use the normal way to send.

So, sum up his advantages and disadvantages, excellent: compression transmission, the speed is generally increased by 2 times. Lack: CPU usage will improve, but through my analysis, GZIP will only compress when accessing a page. Next time, if the page does not change, it will not be compressed unless it is using compressed dynamic files. To decompress.

REM Setup IIsCompressionScheme for deflate cscript adsutil.vbs set W3Svc /Filters /Compression /DEFLATE /HcCompressionDll "% windir% \\ system32 \\ inetsrv \\ gzip.dll" cscript adsutil.vbs set W3Svc /Filters /Compression /DEFLATE /HcCreateFlags 0 cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDoDynamicCompression TRUE cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDoOnDemandCompression TRUE cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDoStaticCompression TRUE cscript adsutil .vbs set W3Svc /Filters /Compression /DEFLATE /HcDynamicCompressionLevel 9 cscript adsutil.vbs set W3Svc /Filters /Compression /DEFLATE /HcFileExtensions "htm" "html" "txt" "js" "xml" "css" cscript adsutil.vbs set W3Svc /Filters /Compression /DEFLATE /HcOnDemandCompLevel 9 cscript adsutil.vbs set W3Svc /Filters /Compression /DEFLATE /HcPriority 1 cscript adsutil.vbs set W3Svc /Filters /Compression /DEFLATE /HcScriptFileExtensions "asp" "dll" "exe" "aspx " "asmx" REM Setup IIsCompressionScheme for GZip cscri pt adsutil.vbs set W3Svc /Filters /Compression /GZIP /HcCompressionDll "% windir% \\ system32 \\ inetsrv \\ gzip.dll" cscript adsutil.vbs set W3Svc /Filters /Compression /GZIP /HcCreateFlags 1 cscript adsutil.vbs set W3Svc /Filters /Compression /GZIP /HcDoDynamicCompression TRUE cscript adsutil.vbs set W3Svc /Filters /Compression /GZIP /HcDoOnDemandCompression TRUE cscript adsutil.vbs set W3Svc /Filters /Compression /GZIP /HcDoStaticCompression TRUE cscript adsutil.vbs set W3Svc /Filters /Compression /GZIP /HcDynamicCompressionLevel 9 cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcFileExtensions "htm" "html" "txt" "js" "xml" "css" cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcOnDemandCompLevel 9 cscript Adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcPriority 1 cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcScriptFileExtensions "asp" "dll" "exe" "aspx" "asmx" REM Setup IIsCompressionSchemes parameters cscript adsutil. Vbs set W3SVC/Filters/Compression/Parameters/HcCacheControlHeader max-a Ge=86400 cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcCompressionBufferSize 102400 cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcCompressionDirectory "%windir%\\IIS Temporary Compressed Files" cscript adsutil.vbs set W3SVC/Filters /Compression /Parameters /HcDoDiskSpaceLimiting FALSE cscript adsutil.vbs set W3SVC /Filters /Compression /Parameters /HcDoDynamicCompression TRUE cscript adsutil.vbs set W3SVC /Filters /Compression /Parameters /HcDoOnDemandCompression TRUE cscript adsutil.vbs set W3SVC /Filters /Compression /Parameters /HcDoStaticCompression TRUE cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcExpiresHeader "Wed, 01 Jan 1997 12:00:00 GMT" cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcFilesDeletedPerDiskFree 256 cscript adsutil.vbs set W3SVC /Filters/Compression/Parameters/HcIoBufferSize 102400 cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcMaxDiskSpaceUsage 0

The above is the method, save as a batch The command file is fine. The format is: adsutil.vbs

Copyright © Windows knowledge All Rights Reserved