ASP.NET Weblogs

Phil Scott's WebLog

Quite exciting this computer magic

IIS 6.0, Content-Encoding: gzip

Today I decided to play around with IIS 6.0 and kick the tires when it came to gzip support.  IIS 5.0 was all but useless when it came to gzip unless you had some serious cash to buy third party support for it, so I was interested to see if gzip even worked.  My first problem was just finding the darn thing, and I feel like an idiot for even having to post how to find the options for enabling compression.  But I am an idiot, so this kinda all works out.  What you need to do is hop into IIS manager, and right click on the Web Sites folder.  Not the computer, not the default web site, not a folder but the web sites folder.  Bring up the properties window, and the last tab is called Service.  It looks a little something like this:

I went ahead and checked off both static files, and application files and let it grow to however big it needs to get.  Here's my results brought to you by the swell live http headers plug-in of Mozilla (I've snipped out a lot of unimportant stuff).

Normal, non-gzipped request:
GET /yahoo.htm HTTP/1.1
Accept-Encoding: gzip,deflate
Keep-Alive: 300
Connection: keep-alive

HTTP/1.x 200 OK
Content-Length: 39762

Gzipped Request:
GET /yahoo.htm HTTP/1.1
Accept-Encoding: gzip,deflate
Keep-Alive: 300
Connection: keep-alive

HTTP/1.x 200 OK
Content-Length: 10304
Content-Encoding: gzip

That's a pretty decent chunk taken off there.  Now, I tried my best to reproduce the 2048 bug.  I even downloaded freakin' Real Download (thank Jebus for VMWare) and tried it out.  The only thing I didn't try was connecting via a proxy to my server, which I've heard might be at the cause of the 2048 bug. 

Sooo...It seems compression support is safe for now in IIS 6, short of the proxy check.  Anyone else have a better view of this than my guess and check opinion?  I checked out Microsoft's site and they seem to be only running gzip on css and js files.  WTF?  Actually, I can't find anyone running gzip and windows 2003.  mod_gzip is all over the place though, so I can't really think that a site like would honestly care if someone in Netscape 3 or IE 3 can't view their site.  Hmmmm.  Strange things are afoot at the Circle-K.



Nagesh said:


Did you try requesting dynamic pages like asps and see the response. I am interested in knowing whether a Http1.0 request for a page which is more than say 8k also returns a Connection : keep-alive and Content-Length header.
I havent got to trying this yet but was hoping you've attempted it.
October 2, 2003 4:08 PM

Micah LaCombe said:

I set the options in IIS 6.0 to use gzip... but when I vew Page Info in Mozilla, the Content-Encoding is never reported as gzip .. and the file size remains constant.

Any ideas on what I am doing wrong here?
February 16, 2004 1:28 PM

Kyle Cordes said:

It's nice to see gzip there, but deflate compression, which is approximately the same thing and is supported by browsers as well, is included in II5. It's a bit tedious to set up (a few command line commands), but works. We've been using it for a few years now.

So it's nice, but not really that big of a deal to have gzip in II6.

April 2, 2004 2:00 PM

DevareattyVaH said:

nice, really nice!

April 17, 2009 3:00 AM

Niko said:

Just a note on your Nasdaq comment.

It is my understanding that if a browser does not support gzip a server will not send a gzipped reply.

This is the source of the 2048 bug because proxies wanting to cache without adding (a tiny bit of) uncompression time actually munge the request header saying the browser supports a gzipped reply



February 28, 2010 6:08 PM