Mobile app version of vmapp.org
Login or Join
Ravi8258870

: Setting Cache-Control and Expires headers for the end client only I am trying to add explicit caching to 301 redirects. However, I am worried that a permanent redirect for one user might not

@Ravi8258870

Posted in: #Cache #CacheControl #Expires

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Ravi8258870

1 Comments

Sorted by latest first Latest Oldest Best

 

@Carla537

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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme