Pay close attention to the fact that the IIS 7.x web.config setting of
noCompressionForProxies="false"
Is not honored at the web.config level. It must be set in C:\Windows\System32\inetsrv\config\ApplicationHost.config like so:
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" noCompressionForProxies="False">
Be sure and perform an IIS reset after changing the setting.
A request is determined to be from a proxy by IIS if the client's web request has the HTTP "Via" header like so:
Via: 1.1 foo
I found in a few of my tests, I didn't have to do the httpCompression options, just the urlCompression tags.
<configuration>
<system.webServer>
<urlCompression doDynamicCompression="true" />
</system.webServer>
</configuration>
You can achieve the same by going through the UI, and setting the option there, and it'll write the above to your web.config for you. This is under Site\Compression "Enable dynamic content compression" (Static option is usually enabled by default).
The same applies for client caching, but IIS appears to only apply this to static content. This is under Site\HTTP Response Headers\Set Common Headers, and you can enable the web content expiration there. Or the web.config version:
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
</staticContent>
</system.webServer>
This sets it for 7 days. When combined, Google's Page Speed FireFox plugin it stops complaining about compression, and browser caching.
Best Answer
You need to set it in the compression scheme:
http://www.iis.net/ConfigReference/system.webServer/httpCompression/scheme
for example to set it in gzip using AppCmd:
appcmd.exe set config -section:system.webServer/httpCompression /[name='gzip'].dynamicCompressionLevel:"5" /commit:apphost