mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
General: Remove the Pragma header from responses.
`Pragma` is supposed to be a request header, but we've been including it in responses since the beginning of time. This is a relic dating all the way back to b2, probably originally added because Internet Explorer version 5 and earlier didn't understand the `Cache-Control` header in responses, but they did (incorrectly) obey the `Pragma` header. Internet Explorer 6 and 7 will obey the `Pragma` response header only if no other cache-related response headers are present (in our case, they are always present), and all other browsers ignore the `Pragma` response header. Props geekysoft. Fixes #37250. git-svn-id: https://develop.svn.wordpress.org/trunk@37944 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1099,7 +1099,6 @@ function wp_get_nocache_headers() {
|
||||
$headers = array(
|
||||
'Expires' => 'Wed, 11 Jan 1984 05:00:00 GMT',
|
||||
'Cache-Control' => 'no-cache, must-revalidate, max-age=0',
|
||||
'Pragma' => 'no-cache',
|
||||
);
|
||||
|
||||
if ( function_exists('apply_filters') ) {
|
||||
@@ -1115,7 +1114,6 @@ function wp_get_nocache_headers() {
|
||||
*
|
||||
* @type string $Expires Expires header.
|
||||
* @type string $Cache-Control Cache-Control header.
|
||||
* @type string $Pragma Pragma header.
|
||||
* }
|
||||
*/
|
||||
$headers = (array) apply_filters( 'nocache_headers', $headers );
|
||||
|
||||
Reference in New Issue
Block a user