Created
December 29, 2018 10:35
-
-
Save unaibamir/dc87c19a666ba120801a7806f455feb5 to your computer and use it in GitHub Desktop.
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
add_action( "wp_head", "_wn_no_cache" ); | |
function _wn_no_cache() { | |
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 | |
header("Cache-Control: post-check=0, pre-check=0", false); | |
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past | |
header("Pragma: no-cache"); // HTTP/1.0 | |
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment