Make WordPress Core


Ignore:
Timestamp:
07/04/2016 04:01:19 AM (9 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-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 );
Note: See TracChangeset for help on using the changeset viewer.