Skip to content

Instantly share code, notes, and snippets.

@mattbrictson
Created October 29, 2011 00:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattbrictson/1323885 to your computer and use it in GitHub Desktop.
Save mattbrictson/1323885 to your computer and use it in GitHub Desktop.
How to Defeat the Browser Back Button Cache
Cache-Control: no-cache, max-age=0, must-revalidate, no-store
/**
* Disable browser back button cache.
*/
@Override
protected void configureResponse(WebResponse response)
{
super.configureResponse(response);
response.setHeader(
"Cache-Control",
"no-cache, max-age=0, must-revalidate, no-store");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment