locked
gzip only certain pages RRS feed

  • Question

  • User1080785583 posted

    Is there a way to achieve this? example, run gzip only if the file is over 400kb and is Content-Type: text/html; charset=utf-8.

    I have web.config setup but i dont know how to set threshold of file size and content-type.

    <httpCompression>
          <remove name="gzip"/>
          <scheme name="gzip" dynamicCompressionLevel="9" staticCompressionLevel="9" doDynamicCompression="true" doStaticCompression="true" dll="%Windir%\system32\inetsrv\gzip.dll"/>
          <dynamicTypes>
            <add mimeType="text/*" enabled="true"/>
            <add mimeType="message/*" enabled="true"/>
            <add mimeType="application/javascript" enabled="true"/>
            <add mimeType="application/x-javascript" enabled="true"/>
            <add mimeType="application/javascript; charset=utf-8" enabled="true"/>
            <!--<add mimeType="*/*" enabled="true"/>-->
          </dynamicTypes>
          <staticTypes>
            <add mimeType="text/*" enabled="true"/>
            <add mimeType="text/css" enabled="true"/>
            <add mimeType="text/javascript" enabled="true"/>
            <add mimeType="message/*" enabled="true"/>
            <add mimeType="application/javascript" enabled="true"/>
            <add mimeType="application/x-javascript" enabled="true"/>
            <add mimeType="application/javascript; charset=utf-8" enabled="true"/>
            <!--<add mimeType="*/*" enabled="true"/>-->
          </staticTypes>
        </httpCompression>



    Monday, March 4, 2013 5:08 PM

Answers

All replies