Here are the steps to enable GZIP compression in IIS 6.0.
First Go here: http://dotnetjunkies.com/weblog/donnymack/posts/876.aspx - Make sure to follow the instructions to the T.
In the final step you're going to be editing the metabase.xml file (IIS 6.0 Metabase) BACKUP FIRST. I was interested in finding out all the properties here and this is what I found. First, the entry for GZIP compression:
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/gzip"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="1"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcDynamicCompressionLevel="10"
HcFileExtensions="htm
html
txt"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
dll
exe
aspx"
>
</IIsCompressionScheme>
I'll just go over some of the attributes I found useful.
- HcDoDynamicCompression: Specifies whether dynamic content should be compressed.
Important Because dynamic content is by definition always changing, IIS does not cache compressed versions of dynamic output. Thus, if dynamic compression is enabled, each request for dynamic content causes the content to be compressed. Dynamic compression consumes considerable CPU time and memory resources, and should only be used on servers that have slow network connections, but CPU time to spare.
- HcDoStaticCompression: Secifies wheter static content should be compressed
- HcDoOnDemandCompression: specifies whether static files, such as .htm and .txt files, are compressed if a compressed version of the file does not exist. If set to true and a file doesn't exist the user will be sent an uncompressed file while a background thread creates a compressed version for the next request.
- HcDynamicCompressionLevel: VAL(1-10) specifies the compression level for the compression scheme, when the scheme is compressing dynamic content. Low compression levels produce slightly larger compressed files, but with lower overall impact on CPU and memory resources. Higher compression levels generally result in smaller compressed files, but with higher CPU and memory usage.
- HcFileExtensions: indicates which file name extensions are supported by the compression scheme. Only static files with the specified file extensions are compressed by IIS. If this setting is empty, no static files are compressed.
- HcScriptFileExtensions: indicates which file name extensions are supported by the compression scheme. The output from dynamic files with the file extensions specified in this property are compressed by IIS.
More Information on these settings and others: http://msdn.microsoft.com/library/en-us/iisref/htm/AlphabeticMetabasePropertyList.asp?frame=true#H - if this doesn't bring you to the H section - that's where you'll find everything.