Last active
April 26, 2016 12:03
-
-
Save lupin72/421242c47dd2371c840d3caa957096f1 to your computer and use it in GitHub Desktop.
WordPress - Prevent browser from caching authenticated pages
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
function example_update_nocache_headers($headers) { | |
$headers['Cache-Control'] = 'no-cache, must-revalidate, max-age=0, no-store'; | |
$headers['Pragma'] = 'no-cache'; | |
return $headers; | |
} | |
add_filter('nocache_headers','example_update_nocache_headers'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment