Add a note about back button and no-cache#44575
Conversation
|
Preview URLs (2 pages) External URLs (2)URL:
URL:
(comment last updated: 2026-07-02 23:58:01) |
|
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 |
tunetheweb
left a comment
There was a problem hiding this comment.
Sorry @hamishwillee , I've two final suggestions.
WDYT? If good then can merge.
Co-authored-by: Barry Pollard <barrypollard@google.com> Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
hamishwillee
left a comment
There was a problem hiding this comment.
Thanks @tunetheweb

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