Add a note about back button and no-cache#44575
Conversation
|
@fergald FYI comments welcome! |
|
Preview URLs (2 pages) External URLs (2)URL:
URL:
(comment last updated: 2026-06-29 23:44:04) |
|
Thanks @tunetheweb - very useful. I've subedited a little to my taste - mostly because I wanted to be even more direct about the unexpected case being the history navigations. I also duplicated the note in
|
|
I could be wrong but I thought this also impacted |
|
Thanks @hamishwillee . I wasn't loving your last sentence (it seems to imply using back DOES use the HTTP cache outside of bfcache), so tweaks that a little further. I don't think this needs to be on the History API page. It doesn't discuss other caching directives. So think these two pages are sufficient. PTAL and merge if good! @fergald I added a similar comment to |
| ``` | ||
|
|
||
| `max-age=0` means that the response is immediately stale, and `must-revalidate` means that it must not be reused without revalidation once it is stale — so, in combination, the semantics seem to be the same as `no-cache`. | ||
| `max-age=0` means that the response is immediately stale, and `must-revalidate` means that it must not be reused without revalidation once it is stale — so, in combination, the semantics seem to be the same as `no-cache` (including with above caveat about history navigations). |
There was a problem hiding this comment.
Lets remove this and put above in note - it is then directly stated it applies.
@tunetheweb I wasn't loving your last sentence either - very hard to parse. However I've restructured this and I am pretty sure we'll both be happy. |
Description
Add a section to explain
no-cachedoesn't mean browsers will always revalidate.Motivation
Developers are often confused when browsers reuse
no-cachepages when they expect them to reload. For example:This came up again in an internal discussion and we realised this is not documented anywhere.
Additional details
Chrome and Firefox does this as can be seen from this test page.
Safari is difficult to confirm as they agressively use bfcache and everything I've tried to force it not to do that fails. Only
no-storestops bfcache from being used by but that is not what I'm trying to test!Related issues and pull requests