Enable IIS6 gzip features, improve web site opening speed, reduce bandwidth consumption _win server

Source: Internet
Author: User
Tags cpu usage
So ah, such as my technical personnel, have not considered the use of him, yesterday suddenly saw this thought, may be useful to me, but from the Internet to find, are a bunch of manual operation method, very troublesome Ah, but previously studied the IIS configuration file: C:\WINDOWS\system32\inetsrv\ MetaBase.xml, so yes, I know that as long as the function of IIS can be modified by this file to complete, so, on the file to do, according to the changes provided on the Web site, in the online search a circle, to find a similar ClickOnce things, oh, I am looking for this, All operations are a key in place, as long as the implementation of a section of VBS or CMD configured well, hehe.

Using gzip compression increases server CPU usage but can reduce the data sent by the server to the client by compression, and if you use gzip compression IIS automatically detects when sending data to the client, if the client browser supports Ie6.0,firefox Gzip, The data is then transferred using gzip compression and, if not supported, sent in a regular manner.

Therefore, summed up his advantages and disadvantages, excellent: compressed transmission, the speed generally increased twice times. Missing: CPU usage will improve, but through my point of analysis, gzip only access to a page will be compressed, the next time if the page does not change is not compressed, unless the use of compressed dynamic files, this has to compress in real time.
Copy Code code 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, 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 above is the method adsutil.vbs not necessarily everyone can find, so provide complete download address:
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.