IIS 6 Compression – The Quick Way

There are many articles that I’ve come across that detail how to enable gzip compression within IIS 6 on a Windows Server 2003 with the Application Server option enabled nder the Configure My Server 2003 wizard. Gzip compression can compress the output of dynamic webpages (.aspx) and webservices (.asmx). It can reduce the filesize significantly.

Here is a series of steps found here: IIS Compression.

  • Go to IIS Manager from Administrative Tools
  • Right click on the computer name (not on websites or Default Web Site)
  • Selecct All Tasks > Restart IIS
  • From the drop down, select “Stop IIS” and click OK
  • IIS is not stopped. Verify it’s not running.
  • Go to C:\WINDOWS\SYSTEM32\INETSRV
  • Important: Backup the file Metabase.xml
  • Open the metabase.xml in Notepad.
  • Search for “<IIsCompressionScheme”
    Note: The results should match like this: “<IIsCompressionScheme Location =”/LM/W3SVC/Filters/Compression/deflate”
    Note: There are two nodes which are <IISCompressionsScheme> and one plural node which is <IISCompressionsSchemes >
  • Delete these nodes. After deleting you will see the next node is “<IIsWebInfo Location =”/LM/W3SVC/Info”
  • Paste the following code in the place of the deleted nodes.
CODE
&lt;IIsCompressionScheme	Location ="/LM/W3SVC/Filters/Compression/deflate"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="0"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcDynamicCompressionLevel="9"
HcFileExtensions="htm
html
xml
css
txt
rdf
js"
HcOnDemandCompLevel="9"
HcPriority="1"
HcScriptFileExtensions="aspx
asmx
asbx
ashx
axd
php"
&gt;
&lt;/IIsCompressionScheme&gt;
&lt;IIsCompressionScheme	Location ="/LM/W3SVC/Filters/Compression/gzip"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="1"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcDynamicCompressionLevel="9"
HcFileExtensions="htm
html
xml
css
txt
rdf
js"
HcOnDemandCompLevel="9"
HcPriority="1"
HcScriptFileExtensions="aspx
asmx
asbx
ashx
axd
php"
&gt;
&lt;/IIsCompressionScheme&gt;
&lt;IIsCompressionSchemes	Location ="/LM/W3SVC/Filters/Compression/Parameters"
HcCacheControlHeader="max-age=86400"
HcCompressionBufferSize="8192"
HcCompressionDirectory="%windir%\IIS Temporary Compressed Files"
HcDoDiskSpaceLimiting="FALSE"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcExpiresHeader="Wed, 01 Jan 1997 12:00:00 GMT"
HcFilesDeletedPerDiskFree="256"
HcIoBufferSize="8192"
HcMaxDiskSpaceUsage="99614720"
HcMaxQueueLength="1000"
HcMinFileSizeForComp="1"
HcNoCompressionForHttp10="TRUE"
HcNoCompressionForProxies="TRUE"
HcNoCompressionForRange="FALSE"
HcSendCacheHeaders="FALSE"
&gt;
&lt;/IIsCompressionSchemes&gt;

Verify that compression is enabled, with this online tool.

Source: IIS Compression