5

I am trying to get IIS to compress jquery.js (and all other static files, but using jquery as the example here) on my localhost, but something goes wrong.

The funny part is that when I look in my %SystemDrive%\inetpub\temp\IIS Temporary Compressed Files\MySiteName, I see the jquery.js file there, and its size is 24 KB. But in the browser, according to the Net tab on Firebug, the size is 69 kb.

I've tried the following: - Checked that my browser accept compression. I found "Accept-Encoding gzip, deflate" in the request header via Firebug - Enabling Failed Request Tracing. Nothing turns up in the %SystemDrive%\inetpub\logs\FailedReqLogFiles folder after I do my request though.

Peter Evjan
  • 171
  • 1
  • 5
  • "Nothing turns up in the %SystemDrive%\inetpub\logs\FailedReqLogFiles folder after I do my request" … so, have to ask: do you have any Failed Request Tracing rules set up? If not, you won't get anything there. You might be thinking of HTTPERR. But Failed Request Tracing, targeting a 200 response, would contain exactly what you need to help debug this. – TristanK Mar 20 '12 at 06:03

2 Answers2

2

I noticed that in my Failed Request Log (which I had to set up a rule in that made sure it logged successful requests) the jquery file compression was not a success with the error code NOT_FREQUENTLY_HIT. So I tried making a bunch of requests manually by refreshing the browser and all of a sudden the jquery file had been compressed.

Peter Evjan
  • 171
  • 1
  • 5
0

You're missing the Content-Encoding response heading, correct?

In IIS7, click on the site that you are working with. In the panel with all the lovely icons, do you see the compression listing? Click into it and make sure that you have compression enabled for static content.

If you are missing the compression listing, then you need to enable it. If you're on Windows 7, just go into the Windows Features and turn it on (pictured below).

IIS7 Compression

Justin Helgerson
  • 978
  • 7
  • 12