Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Google Page Speed on my website in IIS7 and I was wondering how to set

Leverage browser caching - The following resources are missing a cache expiration
Leverage proxy caching - Consider adding a "Cache-Control: public" header to the following resources.

I am using doDynamicCompression in my web.config and little confused how to set these ? Hoping for some help

Note: Reference being used

share|improve this question

I found in a few of my tests, I didn't have to do the httpCompression options, just the urlCompression tags.

    <urlCompression doDynamicCompression="true" />

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:

    <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />

This sets it for 7 days. When combined, Google's Page Speed FireFox plugin it stops complaining about compression, and browser caching.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.