Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We've enabled Gzip compression on the server in IIS (IIS6). We've run iisreset. It just doesn't want to take effect. We had this before on another server, and after a little while, it just started working.

Is it supposed to "take" right away? If not, how long does it take? Is there anything that we can do to expedite this?

share|improve this question

5 Answers 5

up vote 1 down vote accepted

Are you sure the result's not being cached? You can verify the server remotely here

share|improve this answer

Also, by default IIS 6.0 is only configured to compress the following file types: htm, html, txt, asp, dll, exe.

So if you're browsing to some other type of file (php or aspx, for example) it won't be compressed.

You can configure additional file types to be compressed using the following commands:

for static file types...

cscript c:\Inetpub\AdminScripts\adsutil.vbs SET W3SVC/Filters/Compression/deflate/HcFileExtensions htm html txt css js  
cscript c:\Inetpub\AdminScripts\adsutil.vbs SET W3SVC/Filters/Compression/gzip/HcFileExtensions htm html txt css js

for dynamic file types...

cscript c:\Inetpub\AdminScripts\adsutil.vbs SET W3SVC/Filters/Compression/deflate/HcScriptFileExtensions asp dll exe aspx asmx php
cscript c:\Inetpub\AdminScripts\adsutil.vbs SET W3SVC/Filters/Compression/gzip/HcScriptFileExtensions asp dll exe aspx asmx php
share|improve this answer

Here's a list of everything necessary to get IIS 6 compression enabled: http://weblogs.asp.net/owscott/archive/2004/01/12/IIS-Compression-in-IIS6.0.aspx. Double check that to ensure that you set everything.

As long as you configured it correctly and did an iisreset and nothing is cached, it will take affect immediately.

share|improve this answer

An additional note: for static files, IIS doesn't do any compression on the first request. It serves the first request for say "myfile.html" uncompressed, and then compresses the static file in the background, and sticks it in the compressed files cache. All subsequent requests for "myfile.html" will then return the compressed version.

This is a somewhat unnecessary optimization in my opinion, but I think the idea is to not make the first requester wait for compression to happen, since IIS uses very aggressive and CPU-intensive compression settings for static content by default (similar to gzip -9). All subsequent requests for the file use the highly-compressed version from cache.

The opposite is true for dynamic pages on IIS... it uses a very low compression setting by default (similar to gzip -1), and compresses every page on-the-fly.

share|improve this answer

Go through every step in this walk-through on IIS6 gzip compression: http://engineering.leads360.com/post/9301650692/http-compression-gzip-on-iis-6

...and that should work for you.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.