Skip to content

Instantly share code, notes, and snippets.

@ravasthi
Created October 24, 2011 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ravasthi/1309822 to your computer and use it in GitHub Desktop.
Save ravasthi/1309822 to your computer and use it in GitHub Desktop.
Browser back button cache
Cache-Control: no-cache, max-age=0, must-revalidate, no-store
/**
* Disable browser back button cache.
*/
@Override
protected void configureResponse()
{
super.configureResponse();
WebResponse response = getWebRequestCycle().getWebResponse();
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