Skip to content

Instantly share code, notes, and snippets.

@gabrielizalo
Created July 8, 2017 00:24
Show Gist options
  • Save gabrielizalo/7300b0ae1bfd897704b881fc151b092e to your computer and use it in GitHub Desktop.
Save gabrielizalo/7300b0ae1bfd897704b881fc151b092e to your computer and use it in GitHub Desktop.
.Net - No Cache Headers
// 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