Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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