How do I force IIS 7.X to do static compression regardless of how frequently the static file is accessed? If I refresh the page in Firefox with caching disabled, that is the only way it does the static compression because of some "Not Frequently Hit" condition which refuses to do the static compression unless the file is frequently accessed.....
More details: http://forums.iis.net/t/1162238.aspx
Took me a while to figure this out too. Setting the frequentHitThreshold attribute to 1 on the system.webServer/serverRuntime node in the applicationHost.config file should do the trick, as documented at http://www.iis.net/ConfigReference/system.webServer/serverRuntime.
You can do this by executing the following command as an administrator:
%windir%\system32\inetsrv\appcmd set config /section:serverRuntime /frequentHitThreshold:1 /commit:apphost
A word of warning - the "frequent hit" concept does not seem specific to compression. I have no idea whether there are other consequences as a result of setting this!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With