iisweb-configiis-7.5iis-8applicationhost

httpCompression not work inside web.config


Is their anyway to make httpCompression work from inside web.config ?

i try to add this in my web.config but it's does nothing :

<httpCompression>
  <dynamicTypes>
    <clear />
    <add mimeType="text/*" enabled="true" />
    <add mimeType="application/json" enabled="true" />    
    <add mimeType="application/javascript" enabled="true" />
    <add mimeType="*/*" enabled="false" />
  </dynamicTypes>
  <staticTypes>
    <clear />
    <add mimeType="text/*" enabled="true" />
    <add mimeType="application/javascript" enabled="true" />
    <add mimeType="*/*" enabled="false" />
  </staticTypes>
</httpCompression> 

Solution

  • Overriding compression related settings in web.config is considered a new addition in IIS 10,

    https://blogs.msdn.microsoft.com/friis/2017/09/05/iis-dynamic-compression-and-new-dynamic-compression-features-in-iis-10/

    So to answer your question, you have to upgrade to IIS 10.