Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS 7.X Static Compression - Not Frequently Hit

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

like image 704
jjxtra Avatar asked Jun 21 '11 06:06

jjxtra


1 Answers

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!

like image 120
Dale Anderson Avatar answered Nov 15 '22 13:11

Dale Anderson