0

IIS Compression is not working in localhost even though I added this code to the webconfig file to enable dynamic compression:

  <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
      <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" staticCompressionLevel="9" />
      <dynamicTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/x-javascript" enabled="true" />       
        <add mimeType="application/json" enabled="true" />
        <add mimeType="application/json; charset=utf-8" enabled="true" />
        <add mimeType="*/*" enabled="false" />
      </dynamicTypes>
      <staticTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/x-javascript" enabled="true" />
        <add mimeType="application/atom+xml" enabled="true" />
        <add mimeType="application/xaml+xml" enabled="true" />
        <add mimeType="*/*" enabled="false" />
      </staticTypes>
    </httpCompression>
    <urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="true" />
RickL
  • 3,318
  • 10
  • 38
  • 39
  • Are u testing with a static file(.html,.css,.js etc), or dynamic content(anything that is generated via asp.net app)? Be sure that you are activated Content Compression via "Server Roles". Be sure that your requests are satisfy these rules staticCompressionIgnoreHitFrequency, minFileSizeForComp. forexample:minFileSizeForComp default value is 2700, which means compression won't work for resource whose size is lower than this. – Yucel Jun 08 '17 at 12:28
  • i tried with dynamicTypes content type is "application/json" yes all rules are satisfied & size is larger than 2700 then also it is not working – Usha Chowdary Jun 08 '17 at 12:42

0 Answers0