Question

I have the following setup in my web.config (within system.webSever tag) to compress components such as javascript and css with gzip. However it does not seem to be working as when I run YSlow against my site I still get the recommendation to gzip the components.

<httpCompression minFileSizeForComp="0" doDiskSpaceLimiting="false"
          staticCompressionDisableCpuUsage="98" staticCompressionEnableCpuUsage="95"
          dynamicCompressionEnableCpuUsage="30" dynamicCompressionDisableCpuUsage="60"
          directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
        <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
        <staticTypes>
            <clear />
            <add mimeType="*/*" enabled="true" />
        </staticTypes>
        <dynamicTypes>
            <clear />
            <add mimeType="*/*" enabled="true" />
        </dynamicTypes>
    </httpCompression>

I am running the site in IIS7 in classic mode, which I think may be my problem. Does the site need to be integrated mode in IIS7 for this to fire?

Was it helpful?

Solution

Try adding the following node on the same level as the httpCompression element:

<urlCompression doStaticCompression="true" doDynamicCompression="true" />

http://www.iis.net/ConfigReference/system.webServer/urlCompression

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top