Created
October 29, 2011 00:08
-
-
Save mattbrictson/1323885 to your computer and use it in GitHub Desktop.
How to Defeat the Browser Back Button Cache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cache-Control: no-cache, max-age=0, must-revalidate, no-store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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