Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am trying to add explicit caching to 301 redirects. However, I am worried that a permanent redirect for one user might not be permanent for another user. So I'd like to use Cache-Control: no-cache so that upstream servers like my ISP don't cache that request (I believe that's how this works).

This leaves the Expires header which I've set to one month in the future. But the combination of Cache-Control no-cache and Expires headers makes me think I'm doing it wrong. I'd like for an individual user to have a cached request, but avoid ISP/upstream caching. How should I set up my caching headers on redirects?

share|improve this question
add comment

1 Answer

Ah! I want Cache-Control: private. See the tutorial here: http://www.mnot.net/cache_docs/#EXPIRES

share|improve this answer
add comment

Your Answer

 
discard

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.