Skip to content

add CacheControl Header and reload on bfcache restore#1841

Open
felixrindt wants to merge 1 commit into
mainfrom
cache-control
Open

add CacheControl Header and reload on bfcache restore#1841
felixrindt wants to merge 1 commit into
mainfrom
cache-control

Conversation

@felixrindt

Copy link
Copy Markdown
Member

closes #1840

@felixrindt felixrindt added the [C] enhancement Changes to an existing feature making it better label May 17, 2026
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 81.356%. remained the same — cache-control into main

response: HttpResponse = self.get_response(request)
# To prevent storing sensitive data in the cache as well as
# to prevent outdated data being shown to users
response.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@jeriox says 10 mins TTL would also be fine. Does the browser even use the http cache for html documents?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[C] enhancement Changes to an existing feature making it better

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Browser back navigation creates desync local and server state after disposition edit

2 participants