IIS 7 and Above
Configuration & Scripting
staticCompressionIgnoreHitFrequency does not work at a web-site level
Last post Sep 20, 2017 08:34 AM by Yuk Ding
Sep 13, 2017 10:21 AM|exchange12rocks|LINK
I am trying to delegate staticCompressionIgnoreHitFrequency attribute to a web-site level, so my users would be able to manage this setting independently.
I changed my applicationHost.config as follows:
1. In the <configSections> section in the system.webServer group, I configured settings for httpCompression element as follows:
<section name="httpCompression" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
2. Then I moved the whole httpCompression section from <system.webServer> into <location path="" overrideMode="Allow"> section.
3. Then I configured httpCompression attributes:
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" staticCompressionIgnoreHitFrequency="False" lockAllAttributesExcept="staticCompressionIgnoreHitFrequency">
In a web.config file at a test web-site I added the following after the <system.webServer> element:
<httpCompression staticCompressionIgnoreHitFrequency="True" />
I restarted both AppPool and the web-site.
Still, whenever I request HTML-files from the web-site, GZIP-compression works for frequently accessed files only.
Sep 14, 2017 09:15 AM|Yuk Ding|LINK
Have you checked whether the configuration editor has set the staticcompressionignorehitfrequency to true?
Sep 14, 2017 09:28 AM|exchange12rocks|LINK
Sep 20, 2017 08:34 AM|Yuk Ding|LINK
Have you tried to reboot the machine or IISRESET,recycle?