Microsoft Internet Information Server 6.0 packaged with Windows 2003 comes with HTTP Compression feature. When enabled on the server, this feature compresses web pages and the content within thereby allowing for faster transport and rendering of web pages to the client browser. This feature is active only on browsers that support HTTP Compression.
Note (my notes):Even though, HTTP Compression seems attractive to webmasters and are sometimes tempted to turn the feature on, it is recommended that you first double check how your Server CPU is performing before the feature is turned on. If the CPU is already doing 80% Processor Time (benchmark by msdn), IMHO, don't enable HTTP Compression - as enabling it could bring the CPU down to its knees.
Having double checked my notes above, let's see how to now turn the IIS 6.0 Compression Feature on:When discovering this for my servers at home, I figured there are many small steps involved; more than what's documented in this MSDN article:http://www.microsoft.com/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/Default.asp?url=/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/qos_utilbandwdth.aspSo, let's pull up your sleeves and get started:
Step 1:Open IIS ConsoleOn the left pane, select Web Service Extensions nodeOn the right pane, click on the Add a new Web service extension... link
Step 2:On the resulting dialog, Enter any name you want in the Extension Name text box. I used "IIS 6.0 HTTP Compression"
Click on the Add...On the resulting dialog, browse and select the gzip.dll. This dll handles the compression algorithm for us.
Click Open and then OK to acceptYou should now see the entry in dialog's Required files listIn addition, make sure the Set extension status to Allowed checkbox is checked.Click OK to continue
This completes adding an extension service to handle compression. The new entry should be visible and allowed in the list.
Now comes the next step.Step 3In the IIS Console, select the server name and right clickFrom the pop up click the Restart IIS... option
In the resulting dialog, select Stop Interneet Service on... option
Open Windows Explorer, traverse to \Windows\System32\inetsrv and locate the Metabase.xml fileYou will now edit this file to ensure that IIS compresses file types that you desire (this includes, .aspx, htm, asp, etc)Please take a backup of this file before you start editing the contentOpen the Metabase.xml file with Notepad or whatever your choice might be.
In the editor, search for IISCompressionScheme tagsYou will find 2 entries, a) for deflate and b) for gzip
Note (my notes):There are 2 attributes within this element i) HCFileExtensions and ii) HCScriptFileExtensionsi) The HCFileExtensions points to the static content such as HTM, HTML, TXT, XML, etcii) The HCScriptFileExtensions points to the dynamix content such as ASPX, ASP, DLL, EXE, etcThe values are space separated. You will need to add to these 2 attributes the file extensions you want compressed. You will want to add "aspx” to it at a minimum in the ii) category. If you leave these blank, all file extension types will be compressed.Save the fileRestart IIS Service
Step 4In the IIS Console, select the Server Entry node Right click and select PropertiesSelect the Service tabCheck the Compress application files in the HTTP compression groupIn addition, also check the Compression static files option. If needed, specify where you want IIS to store the temporary/compressed files in.This will activate all of the things we did in the previos steps.
Note (my notes):If you want to disable compression at a later point in time, this will be the place to do it. Simply uncheck the check box.
This completes enabling and activating the IIS 6.0 Compression on you IIS Server.Questions, Comments, please drop me a linecaio
Nagi