Enable gzip of IIS6 to speed up website opening

Source: Internet
Author: User

IIS6 does not enable the gzip function by default. We need to manually configure it, but it does not provide graphical configuration.

So I have never considered using a technical talent like me. I suddenly saw this thought yesterday. It may be useful to me, but I found it online, it is a bunch of manual operations, which is very troublesome, But I have studied the IIS configuration file: c: \ windows \ system32 \ inetsrv \ metabase. XML, so I know that you can modify this file as long as it is an IIS function, I searched the internet and found something similar to clickonce. Haha, I am looking for it. All the operations are in place with one click. I just need to execute a vbs or CMD and configure it.

Gzip compression increases the CPU usage of the server, but can reduce the data sent by the server to the client through compression. If gzip compression is used, IIS will automatically detect the data sent to the client, if the client browser supports ie6.0 and Firefox gzip, Gzip is used to compress the data and then transfer the data. If not, the conventional method is used to send the data.

So, Let's sum up his advantages and disadvantages. Excellent: compression and transmission speed is generally increased by 2 times. Missing: CPU usage will increase. However, according to my analysis, Gzip will only compress a page when it is accessed. It will not compress the page if it is not changed next time, unless dynamic files are compressed, they must be decompressed in real time.
Copy Code The Code is as follows:
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
cscript 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-age = 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
Cscript adsutil. vbs set w3svc/filters/compression/parameters/hcmaxqueuelength 1000
Cscript adsutil. vbs set w3svc/filters/compression/parameters/hcminfilesizeforcomp 1
Cscript adsutil. vbs set w3svc/filters/compression/parameters/hcnocompressionforhttp10 false
Cscript adsutil. vbs set w3svc/filters/compression/parameters/hcnocompressionforproxies false
Cscript adsutil. vbs set w3svc/filters/compression/parameters/hcnocompressionforrange false
Cscript adsutil. vbs set w3svc/filters/compression/parameters/hcsendcacheheaders false

Iisreset

The preceding method adsutil. vbs is not necessarily available to anyone, so the complete method is provided:
Http://www.jb51.net/softs/11717.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.