Opened 9 months ago
Last modified 9 months ago
#21938 new enhancement
Add "no-store" to Cache-Control header to prevent history caching of admin resources
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Administration | Version: | 3.4 |
| Severity: | trivial | Keywords: | has-patch |
| Cc: | ocean90, kovshenin, info@… |
Description
The current implementation of wp_get_nocache_headers does not take into account history caching, which results in a browser serving a cached copy of pages from history (by pressing the Back button) even if the user has long logged out.
RFC 2616 14.9.2 no-store describes this cache directive.
To repoduce: login to dashboard, logout, press the back button.
Expected: the login screen.
Reality: a copy of the previous page.
By adding the "no-store" directive to all non-cachable resources the behavior was mitigated successfully in Chrome 21, Firefox 15. Fails on Opera 12 (they chose to disregard "no-store" when applied to history, RFC allows this).
Attachments (1)
Change History (7)
soulseekah
— 9 months ago
comment:3
follow-up:
↓ 4
toscho
— 9 months ago
- Cc info@… added
comment:4
in reply to:
↑ 3
soulseekah
— 9 months ago
Replying to toscho:
That needs good tests. For example the behavior after POST requests can be quite annoying. Performance might be an issue too.
Agreed, under certain circumstances this could be a nuisance, especially if users are logged in and the admin bar is shown. As for performance, it seems that all of twitter is served with "no-store" and it does appear (to me) to be quite jagged navigation-wise.
Without a proper step-by-step testing plan in mind, I guess I'll use the patch in production for a bit to see if it causes any unexpected issues in general.
comment:5
nacin
— 9 months ago
The other issue is sometimes you want the back button to be where you were last, without a complete reload. How many times have you lost a comment or some other content by clicking away (in WP or not) and scrambled to recover it?
comment:6
SergeyBiryukov
— 9 months ago
- Version changed from trunk to 3.4
"no-store" please