Skip to content

SF-3855 Stop logged in pages reappearing via the Back button after logout - #4081

Open
Nateowami wants to merge 1 commit into
masterfrom
fix/SF-3855-no-store
Open

SF-3855 Stop logged in pages reappearing via the Back button after logout#4081
Nateowami wants to merge 1 commit into
masterfrom
fix/SF-3855-no-store

Conversation

@Nateowami

@Nateowami Nateowami commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

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-store on 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 Reviewable

@Nateowami Nateowami added the will require testing PR should not be merged until testers confirm testing is complete label Sep 1, 2026
@Nateowami
Nateowami deployed to screenshot_diff September 1, 2026 22:08 — with GitHub Actions Active
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.88889% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.30%. Comparing base (5767261) to head (0de91ae).
⚠️ Report is 8 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/SIL.XForge.Scripture/Startup.cs 88.88% 1 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

@pmachapman pmachapman self-assigned this Sep 7, 2026
@pmachapman
pmachapman self-requested a review September 7, 2026 19:53

@pmachapman pmachapman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: 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: :shipit: complete! all files reviewed, all discussions resolved (waiting on Nateowami).

@pmachapman pmachapman added ready to test and removed will require testing PR should not be merged until testers confirm testing is complete labels Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants