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

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.

share|improve this question
    
"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 6:03
add comment

2 Answers

up vote 1 down vote accepted

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.

share|improve this answer
    
So does it mean I have to wait sometime for IIS to do something nice? –  Salman A Nov 26 '12 at 18:16
add comment

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

share|improve this answer
    
Thanks. It was already enabled. –  Peter Evjan Mar 20 '12 at 14:23
add comment

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.