вторник, 14 декабря 2010 г.

IIS Compression in IIS6.0

I've applied gzip compression on IIS 6.0!
It's very simple.

1 step: Enable Compression in IIS
- From the IIS snap-in, right-click on the Web Sites node and click on Properties
- Select the Service tab - Enable Compress application files
- Enable Compress static files
- Save and close the Web Site Properties dialog

2 step:
- Stop "World Wide Web Publishing Service" in System Settings -> Services.
- Open the metabase located at C:\Windows\system32\inetsrv\metabase.xml
- Search for <IIsCompressionScheme
- There should be two of them, one for deflate and one for gzip. Basically they are two means of compression that IIS supports.
- First thing to do is add aspx, asmx, php and any other extension that you need to the list extensions in HcScriptFileExtensions. Make sure to follow the existing format carefully, an extra space will keep this from working correctly. Do this for both deflate and gzip.
- Set option HcDynamicCompressionLevel to 9. Do this for both deflate and gzip.
- Start "World Wide Web Publishing Service".

Thanks Scott Forsyth for the post: http://weblogs.asp.net/owscott/archive/2004/01/12/57916.aspx

p.s.: yes, i'm sorry to say that our customer still use IIS 6.0 in 2010 and he didn't apply compression earlier.