Last active
May 8, 2017 21:45
-
-
Save dlh01/c7c900d302589a13cfd2a9beb29ba4fd to your computer and use it in GitHub Desktop.
Try to stop Chrome from caching WordPress feeds during development
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
<?php | |
add_action( 'send_headers', function ( $wp ) { | |
if ( ! empty( $wp->query_vars['feed'] ) ) { | |
header( 'Cache-Control: no-cache, no-store, must-revalidate' ); | |
} | |
}, 100 ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment