Has anyone got the
<httpCompression minFileSizeForComp="XXX">
setting to be honored by IIS 7.x? The documentation here, http://www.iis.net/ConfigReference/system.webServer/httpCompression#005, states
Optional uint attribute. Specifies the minimum number of kilobytes a file must contain in order to use on-demand compression. The default value for IIS 7.5 is 2700; for IIS 7.0 the default value was 256.
I think the documentation meant bytes and not kilobytes. Could you imagine only HTTP compressing a response when it is 2.7 MB or greater?
I tried setting this value in the ApplicationHost.config and web.config with no affect.
IIS definitely respects the minFileSizeForComp setting. However if both dynamic and static compression is enabled then the small file may be compressed by dynamic compression. I wrote a blog post about it and shared the troubleshooting steps using the Failed Request Tracing rules and provided a solution / workaround for this behavior. Please find it in the following link:
Enlightining a mystery with Failed Request Tracing: does IIS not respect the minFileSizeForComp setting for static compression https://blogs.msdn.microsoft.com/amb/2016/05/23/iis-respects-minfilesizeforcomp-for-static-compression/
Hope that helps someone.
-- AMB
I know I'm very late here, but I did some experiments around this issue and have determined that the value is measured in kilobytes. This seems insane, but it's true.
I made a blog post with a little more detail here.
EDIT: Hmm, the issue doesn't seem to be quite this simple. IIS seems to refuse to compress files below a certain size regardless of what is selected.
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