We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
http://stackoverflow.com/questions/49547/making-sure-a-web-page-is-not-cached-across-all-browsers
Using PHP:
header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1. header('Pragma: no-cache'); // HTTP 1.0. header('Expires: 0'); // Proxies.
Using Java Servlet:
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1. response.setHeader("Pragma", "no-cache"); // HTTP 1.0. response.setDateHeader("Expires", 0); // Proxies.
Using ASP.NET:
Response.AppendHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1. Response.AppendHeader("Pragma", "no-cache"); // HTTP 1.0. Response.AppendHeader("Expires", "0"); // Proxies.
Using ASP:
Response.addHeader "Cache-Control", "no-cache, no-store, must-revalidate" ' HTTP 1.1. Response.addHeader "Pragma", "no-cache" ' HTTP 1.0. Response.addHeader "Expires", "0" ' Proxies.
Using Ruby on Rails:
response.headers['Cache-Control'] = 'no-cache, no-store, must-revalidate' # HTTP 1.1. response.headers['Pragma'] = 'no-cache' # HTTP 1.0. response.headers['Expires'] = '0' # Proxies.
Using Python on Flask:
resp.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" resp.headers["Pragma"] = "no-cache" resp.headers["Expires"] = "0"
Using Google Go:
responseWriter.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate") // HTTP 1.1. responseWriter.Header().Set("Pragma", "no-cache") // HTTP 1.0. responseWriter.Header().Set("Expires", "0") // Proxies
Using Apache .htaccess file:
<IfModule mod_headers.c> Header set Cache-Control "no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires 0 </IfModule>
Using HTML:
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="0" />
The text was updated successfully, but these errors were encountered:
No branches or pull requests
http://stackoverflow.com/questions/49547/making-sure-a-web-page-is-not-cached-across-all-browsers
How to set it?
Using PHP:
Using Java Servlet:
Using ASP.NET:
Using ASP:
Using Ruby on Rails:
Using Python on Flask:
Using Google Go:
Using Apache .htaccess file:
Using HTML:
The text was updated successfully, but these errors were encountered: