Due to a misconfiguration of our webserver the main domain sent a 302 redirect to a new location. We fixed that issue. When emptying the browser cache everything works fine now.
For the "normal" client who does not empty his cache: How long is the 302 redirect kept in the browser?
I'm looking for specific cache times (if any) for each of the major browsers (Chrome, Firefox, Safari, Opera, Edge, IE 12) under default settings.
It depends on individual client's browser caching settings: IE has an option to "NEVER" check for new pages, it has the same effect on redirects.
And AFAIR IE's "Automatic" settings (default?) is not much better.
It shouldn't be cached at all unless there's also a
Cache-Control
orExpires
header returned by the web server. According to RFC 2616, section 10.3.3 302 FoundThe standard referenced by Jon Lin here uses "SHOULD", which is not as strong as "MUST" in RFC lingo. This is not just a theoretical distiction; Cloudflare, for example, does cache redirects:
So you should either make sure you can handle it or use explicit headers (e.g.
Cache-Control: private, no-cache
) to direct browsers and intermediates against caching it.Firefox
It should not be cached, per bug 812167
Using Steve Sounder's Redirect Caching Tests tool (thanks @LeonidVasilev), it seems that the results may not be what are expected. With no expires headers or cookies, the results were as follows:
Chrome 71: Not Cached ✔
Firefox 64: Cached ✕
Safari 12: Cached ✕
So despite what RFC 2616, section 10.3.3 302 Found states, not all browsers follow these guidelines or what might be considered expected behaviour :(