Do not issue a Last-Modified header when issuing no-cache headers to avoid aggressive (webkit) caching. Serve a blank header when header_remove() is not available (PHP < 5.3). props andy. fixes #22258.

git-svn-id: https://develop.svn.wordpress.org/trunk@22283 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2012-10-23 15:45:44 +00:00
parent 819c562041
commit 08dafbce51
2 changed files with 6 additions and 1 deletions

View File

@@ -381,6 +381,9 @@ class WP {
foreach( (array) $headers as $name => $field_value )
@header("{$name}: {$field_value}");
if ( isset( $headers['Last-Modified'] ) && empty( $headers['Last-Modified'] ) && function_exists( 'header_remove' ) )
header_remove( 'Last-Modified' );
if ( $exit_required )
exit();