You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 10, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 10, 2025. It is now read-only.
Pagespeed strips Cache-Control:no-store, etc. headers #683
From nathan@k...:
We're seeing an issue where Chrome visitors see a (locally) cached version of
the page when they use their "Back" button. This shouldn't be happening -- the
page should always be reloaded from the server.
I've narrowed the cause down to mod-pagespeed's treatment of the cache headers
(i.e. everything works correctly when mod-pagespeed is disabled). I understand
there's a config option to prevent mod-pagespeed modifying cache headers, but
the fact that the rest of the world isn't seeing this problem with
mod-pagespeed/Chrome makes me think I'm doing something wrong.
What's the best practice for preventing Chrome from serving a cached page on
"back" (when using mod-pagespeed)? For example, one solution is to add a
cache-control header of 'no-store', but the header stripped by mod-pagespeed.
HEADERS BEFORE MOD_PAGESPEED (page is always reloaded from server)
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:keep-alive
Content-Length:26110
Content-Type:text/html;charset=utf-8
Date:Wed, 24 Apr 2013 19:35:22 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Pragma:no-cache
Server:Apache
HEADERS AFTER MOD_PAGESPEED (page is not reloaded when user goes "back")
Cache-Control:max-age=0, no-cache
Connection:keep-alive
Content-Length:26396
Content-Type:text/html;charset=utf-8
Date:Wed, 24 Apr 2013 19:34:29 GMT
Pragma:no-cache
Server:Apache
Vary:Accept-Encoding
X-Mod-Pagespeed:1.2.24.1-2581
Original issue reported on code.google.com by sligocki@google.com on 24 Apr 2013 at 8:26
Original issue reported on code.google.com by
sligocki@google.comon 24 Apr 2013 at 8:26