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'd like to avoid the "Expires" header, and use "Cache-Control" only - or maybe the other way around. The headers will account for a significant percentage of my traffic, so I'd prefer not to "use both".

AFAIK, the "Cache-Control" header was standardized in HTTP 1.1, but are there still web caches/proxies in use, which don't understand it?

Note: This could help answering a part of my stackoverflow (bounty) question

share|improve this question
up vote 1 down vote accepted

Consider using Expires for your expiry information. In the absence of max-age in Cache-control, it provides the same functionality. Use Cache-Control for additional cache control information. If you configure the caching correctly, you should see fewer validation requests which pass through intermediate caches. This will reduce your bandwidth.

Check RFC2616 section 14.9 for the cache values you might want to override. Cache-Control is mainly for overriding cache behavior of intermediate caches. However, there are directives for the browser cache as well.

share|improve this answer
Do you think, that some proxies won't understand Cache-Control? I'm asking, because if that's the case, I could have problems covering all my use cases. – Chris Lercher Jun 9 '10 at 19:06
It is amazing how old some of the systems running out there are. Also some cache implementers may not have implemented Cache-control. If you can't control the infrastructure end to end, I don't believe you can count on current standards applying. Review the RFC and your use cases against V1.0 and V1.1 cache behaviour. At worst, it would be cases requiring revalidation of dynamic content that might require Expires with Cache-control Max-age. For static content that is usually handled by including a version id in the URL, Dynamic content should have a short expiry. – BillThor Jun 12 '10 at 1:45

Your Answer


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

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