4

According to the HTTP spec, upon loading a resource that results in a 302 redirect:

...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.

However, within a single page load, I'm seeing current Chrome and Firefox both resolving subsequent requests to the initial Request-URI to the resolved value from the first request, even when the redirect specifies no caching.

I've setup a minimal repro case here:

http://chrome-302-broke.herokuapp.com/test.html

It's on a free heroku dyno (in case you reach it while it's offline).

Am I missing something? It seems like caching the redirect from the initial response, even within the same page load, is taking liberty with the description from the spec. A strict interpretation shouldn't cache this request at all.

Especially with a growing number of web applications that don't navigate between pages for a considerable amount of time, this seems like it would cause problems for an increasing number of use cases.

Is this something I should submit as a bug to Chrome/Firefox?

Chuck Skoda
  • 103
  • 9
  • 1
    Submitted to Chromium as a bug here: https://bugs.chromium.org/p/chromium/issues/detail?id=733350 – Chuck Skoda Jun 14 '17 at 18:24
  • Possible duplicate of [Chrome and Safari caching 302 redirect](https://stackoverflow.com/questions/22495231/chrome-and-safari-caching-302-redirect) – Imre Pühvel Feb 22 '18 at 08:23

0 Answers0