Wednesday, August 19, 2009

Enabling Gzip compression in IIS 6.0 for ASP.NET websites


Server performance tip , using gzip compression can decrease the number of bytes sent by your server. This gives the perception of faster pages and also cuts down on bandwidth usage. Depending on the data sent, how well it can be compressed, and whether the client browsers support it (IIS will only send gzip compressed content to clients that support gzip compression, such as Internet Explorer 6.0 and Firefox), your server can serve more requests per second. In fact, just about any time you can decrease the amount of data returned, you will increase requests per second.


Step 1:


Expand IIS Manager. Right click on Websites. Click Properties. Click the Service tab. Check the boxes to enable compression,You can give where the temp files can get stored there and the size that is allowed




Install IIS 6.0 Resource Kit Tools download from MSDN .



Open the IIS Metabase Explorer. It is part of the resource kit you just installed. Expand LM>W3SVC>Filters>Compression. You will need to edit both gzip and deflate. Find the item with the name HcScriptFileExtensions. Add the values aspx, axd, asmx, js  and css . Repeat process for gzip and deflate. Find HcDynamicCompressionLevel and set it to something higher than 0.

Never try to gzip audio,Video and jpg files which are already compressed, For jpg and other images use smush it tool