HTTP Compression and IIS 6.0

To ramesh

After enabling compression in IIS, if your using YSlow you need to press CTRL + F5 to get the new compressed data. The first time IIS serves up the file it serves it up uncompressed so all the other times IIS can serve it up compressed.

Also if you were doing testing playing with IIS compression and caching you need to press CTRL + F5 to get IIS to serve up some freshly modified data after each modification of the metabase.xml file.

Hi Jeff,

For some reason I woke up the other day remembering about http compression. On our internal web app I attempted some sort of http compression a while back but it broke our embedded Crystal Reports so I rolled it back and gave up. But I’ve just followed the awesomely simple instructions in that dotnetjunkies article and I’ve got all my static pages and javascript files running great with compression. This has had a massive effect as some of our static pages are 180kb or more and we’re hosting the site at one of our branches with only a 10MBit/1MBit dsl connection.

Cheers!

You may want to add anything output from amx, as this will include JS generated for .net validation controls and the like.

One thing we did notice was that if you have large jpegs in the page, then the compression can be worse. Basically the HTTP compressor is trying to compress something that’s already very well compressed.

Otherwise the instructions here have been a huge help to us.

All of the above suggestions still not enough when iis is on sbs 2003 with isa 2004.

If you have that combo you need to enable the compression (even when the clients are internal) in isa server 2004:

Configuration/General/Define Http Compression Preferences

I would checkout www.ZipEnable.com. I know free is the best price, but like anything, less work/stress pays for itself in many other ways.

Andrew

Hello,

My IIS have active HTTP compression, i have a web aplication installed that use pages .aspx, then I want know what is the best tool to measure the consumption of bandwidth.

I wait for you answer.
Thanks for you help.

I actually went came to this post about 2 weeks ago and took a look at the product, ZipEnable, at the Port80 Software website (www.Port80Software.com) and after evaluation, I do not know how I survived so long without it. It gives you an amazing array of compression features without sacrificing system resources.

I also saw httpZip (www.httpZip.com) on their website, and it seems like a very useful product as well, catering to those outside the IIS 6 spectrum. I also see that you can use httpZip on IIS 6 as well!

Hope this helps anyone for future reference.

Thank you,

M

Hi,

I found your site http://www.codinghorror.com/blog/archives/000059.html is good stuff for IIS HTTP Compression.

I am experiencing login issue with sharepoint central admin site, since we activated compression on websites(through IIS Manager) enabled on Sharepoint central admin site,

I followed the steps as below for activation, after rebooting server we have login issue with Sharepoint central admin site, I did n’t created any web service extensions yet since i deactivated compression after we have login issue.

i thought http compression was enabled on Sharepoint central admin site, what should be additional steps needs to make it work.

Any help/workaround would be appreciated!!!

Procedures
To enable global HTTP compression by using IIS Manager
1.
In IIS Manager, double-click the local computer, right-click the Web Sites folder, and then click Properties.

Click theService tab, and in the HTTP compression section, select the Compress application files check box to enable compression for dynamic files.

Select the Compress static files check box to enable compression for static files.

In the Temporary directory box, type the path to a local directory or click Browse to locate a directory. Once a static file is compressed, it is cached in this temporary directory until it expires, or the content changes. The directory must be on the local drive of an NTFS–formatted partition. The directory cannot be compressed or shared, and the access control lists (ACLs) for the directory must include Full Control access to the identity of the application pool or to the IIS_WPG group.

Under Maximum temporary directory size, click a folder size option. If you specify a maximum size under Limited to (in megabytes) (the default setting is 95 MB), then when the limit is reached, IIS automatically cleans up the temporary directory by applying the “least recently used” rule.

Click Apply, and then click OK.

Regards,

Raju…

Raju, you should check this out:

http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=63

How about this article.

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q313712

Internet Explorer Loses the First 2048 Bytes of Data…

Hi,
I have enabled IIS compression on my server which hosts two websites. Weird thing is compression is working for one of the websites, but not the other. What steps can I take to diagnose why this is happening.

Also, on our internal testing servers, how do I check that compression is working? Since the port80 link you gave only works for sites on the internet. What is this sniffing you mentioned?

Thanks in advance :slight_smile:

Hi Jeff,

I ran into the same problem that you did in getting dynamic script (particularly .JS files) to compress properly. I finally got it working by manually editing the Metabase and moving the JS filetype from the HcFileExtensions to HcScriptFileExtensions.

Oddly, the same thing was happening for CSS files as well.

…just wanted to add that I found this behavior (HcScriptFileExtensions over HcFileExtensions) odd, seeing as how the Microsoft documentation states static filetypes (JS and CSS among them) belong listed in the former: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/25d2170b-09c0-45fd-8da4-898cf9a7d568.mspx?mfr=true

i’d like to add just one small detail…

this configuration has problems for users behind HTTP 1.0 proxies if IIS 6 is used. the reason is someone not interpreting the HTTP 1.0 correctly, related to chunked compression data… (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501192)

in short - compression for HTTP 1.0 clients has to be disabled by changing the option

HcNoCompressionForHttp10="FALSE"

to:

HcNoCompressionForHttp10="TRUE"

as explained in the accepted answer at: http://serverfault.com/questions/12398/http-compression-in-iis-6-0-causing-problems-with-certain-users

Thanks. I was banging my head with compression until I read the line in this post that said “Despite what the MS documentation says, the metabase filename extension lists are not space delimited! They are cr/lf delimited.” So true. CRLF and iisreset and it went from JSON 101KB to 4KB.

Thanks.