I've come to a solution :-) This solution ALWAYS serves a compressed version.
For me too, in IIS 7.5 Manager, I have checked Both boxes, in order to compress both :
- Static files
- Dynamic files
Sometimes (the first-time a webpage is served), it is UNCOMPRESSED.
Then, only the second time, it is COMPRESSED.
The following solution comes from here :
http://www.codeproject.com/Articles/242133/Making-the-most-out-of-IIS-compression-Part-conf
In order to get IIS to ALWAYS cache the compressed version, rather than the uncompressed version, modify the applicationHost.config file. You'll normally find this file in the folder C:\Windows\System32\inetsrv\config:
- Make a backup copy of applicationHost.config.
- Open applicationHost.config with a text editor, — or —
In IIS Manager, navigate to Default Website > Configuration Editor and go to the section "system.webServer/urlCompression"
- Find the section.
- Add the dynamicCompressionBeforeCache="true" attribute to the urlCompression element,
- Collapse | Copy Code
- Save the applicationHost.config file
- Reset the IIS server to make the new attribute take effect
- Start IIS Manager, click the server at the top of the tree, and then click Restart on the right-hand side
I Hope it will save your day, as it saved mine !