Make WordPress Core

Changeset 37944


Ignore:
Timestamp:
07/04/2016 04:01:19 AM (8 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.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r37914 r37944  
    175175        header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
    176176        header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
    177         header( 'Pragma: no-cache' );
    178177        header('Content-Type: application/javascript; charset=UTF-8');
    179178        $force_gzip = ( defined('ENFORCE_GZIP') && ENFORCE_GZIP );
  • 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.