Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not cache error page #14718

Merged
merged 1 commit into from Aug 1, 2019
Merged

Do not cache error page #14718

merged 1 commit into from Aug 1, 2019

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Aug 1, 2019

refs DEV-1725

Ensuring that when the page is reloaded, it will be fetched again.

refs DEV-1725

Ensuring that when the page is reloaded, it will be fetched again.
@tsteur tsteur added the Needs Review PRs that need a code review label Aug 1, 2019
@tsteur tsteur added this to the 3.12.0 milestone Aug 1, 2019
@@ -116,6 +116,7 @@ function Piwik_GetErrorMessagePage($message, $optionalTrace = false, $optionalLi

if (!headers_sent()) {
header('Content-Type: text/html; charset=utf-8');
header('Cache-Control: private, no-cache, no-store');
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason for using multiple cacheability directives? Seems like we'd only need to use no-store (from reading https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#Cacheability).

Copy link
Member Author

Choose a reason for hiding this comment

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

@diosmosis that's what we also use in production see eg https://stackoverflow.com/a/2068407/1447375 . In this case we don't set the Expires or Pragma no-cache but at least the Cache-Control.

Copy link
Member

Choose a reason for hiding this comment

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

I see it's for different browsers. Fun.

@diosmosis diosmosis merged commit 93ba78e into 3.x-dev Aug 1, 2019
@diosmosis diosmosis deleted the dev1725 branch August 1, 2019 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants