Created
July 8, 2017 00:24
-
-
Save gabrielizalo/7300b0ae1bfd897704b881fc151b092e to your computer and use it in GitHub Desktop.
.Net - No Cache Headers
This file contains 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
// Http 1.1 | |
getCurrentResponse().setHeader("Cache-Control", "no store, no-cache, must-revalidate"); | |
// Http 1.0 | |
getCurrentResponse().setHeader("Pragma", "no-cache"); | |
// Prevents caching at the proxy server | |
getCurrentResponse().setDateHeader ("Expires", -1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment