Search code examples
iisiis-6cache-controlcontent-expiration

How do I set the cachability of static files in IIS?


I have some static images in a folder on my IIS 6-based website that I want to be downloaded as little as possible (to preserve bandwidth). I've set the Content Expiration to expire after 30 days. Is there anything else I can do in IIS to try to maximize the caching by browsers, proxy, and gateway caches?

Such as adding a Cache-Control header? Anything else?


Solution

  • http://www.galcho.com/Blog/post/2008/02/27/IIS7-How-to-set-cache-control-for-static-content.aspx

    This is a blog post covering the following:

    1. Allow overriding static content setting
    2. set cache settings using following commands
    3. Cache it on client