Just trying to do a bit of performance tuning on a client's site. I don't want to set far future expiries yet, because we are still changing a lot of stuff regularly, but I'd like to give everything an expiry time of one hour (which will avoid repeat requests for static content during most average visits to the site).

I'm returning Cache-Control headers with a value of max-age=3600, which is fine; however, do I need to set Expires headers too, or are they obsolete now? And if I do need to set them, how would I do it using IIS Manager? The site is served from IIS 6.


The Expires entity-header field gives the date/time after which the response is considered stale.

The Cache-Control general-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain.

The Expires header is a short form of 'Cache-Control: max-age=...', and is not obligatory to be obeyed. To ensure your rules work okay, use both of them: it will do no harm, really :)


  • Thanks - so how would I set dynamic Expires headers so that assets would expire 1 hour from when they were first downloaded? – Mark Bell Nov 27 '09 at 9:25
  • 'Expires' header sets an exact date, while 'Cache-Control: max-age ' handles relative age of downloaded content. use the latter :) – kolypto Nov 27 '09 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.