[thelist] Caching of 302?

Bill Moseley moseley at hank.org
Sat Jan 22 09:34:44 CST 2011


http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html says for a 302

*The requested resource resides temporarily under a different URI. Since the
redirection might be altered on occasion, the client SHOULD continue to use
the Request-URI for future requests. This response is only cacheable if
indicated by a Cache-Control or Expires header field.*


For 302s I tend to not return any cache headers.

Is anyone aware of browsers (or maybe proxies) that would cache in
the absence of explicit no-cache headers?


And I'm not sure what caching means in this case.  Say a request for /foo
includes Expires and Cache-Control instructing the response to be cached and
a redirect to Location /bar.  The response from /bar has explicit no cache
headers.  Does that mean that a later link to /foo the browser will simply
request /bar without making a request for /foo first? I.e. the browser
remembers the redirect?


-- 
Bill Moseley
moseley at hank.org


More information about the thelist mailing list