WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/04/2016 04:01:19 AM (5 years ago)
Author:
pento
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r37932 r37944  
    11001100        'Expires' => 'Wed, 11 Jan 1984 05:00:00 GMT',
    11011101        'Cache-Control' => 'no-cache, must-revalidate, max-age=0',
    1102         'Pragma' => 'no-cache',
    11031102    );
    11041103
     
    11161115         *     @type string $Expires       Expires header.
    11171116         *     @type string $Cache-Control Cache-Control header.
    1118          *     @type string $Pragma        Pragma header.
    11191117         * }
    11201118         */
Note: See TracChangeset for help on using the changeset viewer.