Setting the cache expiry on a single file using IIS

BronwenWeeGo.jpgI needed to turn on content expiration for a single file and wanted to do it through IIS so i didn’t have to write code (lazy me).  Cause i’m blind took me a while to find.

To set a single file/directory/website content expiry…

  1. Navigate to the file
  2. Right click and choose properties
  3. Choose HTTP Headers Tab
  4. Click “Enable Content Expiration”
  5. Choose the expiry you want and save


To check it works, run a program like Fiddler, run up the site and navigate to whatever content you turned the caching on for.  Find the item and the Caching should now display something like “Expires, Sun 24 Mar etc”