In ASP.NET MVC I have used the web.config to enable and configure the IIS7.5 gzip compression settings. But they compress level settings appear to have no effect at all:
<scheme name="gzip" dynamicCompressionLevel="9" staticCompressionLevel="9"/>
With compression level = 0 for both settings, my homepage is gzipped to 9,290 bytes (from 39,623)
With compression level = 9 for both settings, my homepage is gzipped to 9,290 bytes (from 39,623)
(using fiddler to check the zipped/uncompressed sizes)
There is no difference in the amount of compression - why is that? This occurs on my local development machine - Windows 7. I have not tried it on our Win 2008 web server yet.
Full compression settings in web.config:
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" dynamicCompressionLevel="10" staticCompressionLevel="10"/>
<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/xml" enabled="true"/>
<add mimeType="*/*" enabled="false"/>
</dynamicTypes>
<staticTypes>
<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/xml" enabled="true"/>
<add mimeType="*/*" enabled="false"/>
</staticTypes>
</httpCompression>
<urlCompression doStaticCompression="true" doDynamicCompression="true"/>
EDIT: apparently the highest level is 9. This page says it is 10 but must be incorrect http://www.iis.net/configreference/system.webserver/httpcompression/scheme. The problem is still the same when using level 9