SF-3855 Stop logged in pages reappearing via the Back button after logout - #4081
Open
Nateowami wants to merge 1 commit into
Open
SF-3855 Stop logged in pages reappearing via the Back button after logout#4081Nateowami wants to merge 1 commit into
Nateowami wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4081 +/- ##
=======================================
Coverage 81.30% 81.30%
=======================================
Files 670 670
Lines 43462 43480 +18
Branches 7105 7134 +29
=======================================
+ Hits 35336 35352 +16
- Misses 6951 6952 +1
- Partials 1175 1176 +1 ☔ View full report in Codecov by Harness. |
pmachapman
self-requested a review
September 7, 2026 19:53
pmachapman
approved these changes
Sep 7, 2026
pmachapman
left a comment
Collaborator
There was a problem hiding this comment.
I was able to test this locally using the Docker container, and via Chrome Dev Tools' bf cache cheker I could confirm that the Back/Forward cache was disabled by your PR.
@pmachapman reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on Nateowami).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a bug where you can log out, then click back and see the entire page you just logged out of.
The bug was caused by a "feature" in Chromium where the bfcache ("back forward cache") stores the state of the page so when the user clicks the back button navigation is instant. They don't make it trivial to opt out of, but if you set
Cache-Control: no-storeon the html file you're serving, and meet other criteria, it disables the cache.I'm not sure if the problem was active in Firefox, but if it was this should fix it there I think. This fix is mostly targeted at Chromium, and I don't currently know of a fix for Safari or if there is one.
This change is