Make WordPress Core


Ignore:
Timestamp:
01/03/2015 02:56:14 AM (10 years ago)
Author:
wonderboymusic
Message:

When outputting JS with a Content-Type header:

text/javascript is obsolete, application/x-javascript was experimental. application/javascript is the recommended type per RFC 4329.

Props sergej.mueller.
Fixes #29196.

File:
1 edited

Legend:

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

    r31016 r31029  
    173173        header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
    174174        header( 'Pragma: no-cache' );
    175         header('Content-Type: application/x-javascript; charset=UTF-8');
     175        header('Content-Type: application/javascript; charset=UTF-8');
    176176        $force_gzip = ( defined('ENFORCE_GZIP') && ENFORCE_GZIP );
    177177        $test_str = '"wpCompressionTest Lorem ipsum dolor sit amet consectetuer mollis sapien urna ut a. Eu nonummy condimentum fringilla tempor pretium platea vel nibh netus Maecenas. Hac molestie amet justo quis pellentesque est ultrices interdum nibh Morbi. Cras mattis pretium Phasellus ante ipsum ipsum ut sociis Suspendisse Lorem. Ante et non molestie. Porta urna Vestibulum egestas id congue nibh eu risus gravida sit. Ac augue auctor Ut et non a elit massa id sodales. Elit eu Nulla at nibh adipiscing mattis lacus mauris at tempus. Netus nibh quis suscipit nec feugiat eget sed lorem et urna. Pellentesque lacus at ut massa consectetuer ligula ut auctor semper Pellentesque. Ut metus massa nibh quam Curabitur molestie nec mauris congue. Volutpat molestie elit justo facilisis neque ac risus Ut nascetur tristique. Vitae sit lorem tellus et quis Phasellus lacus tincidunt nunc Fusce. Pharetra wisi Suspendisse mus sagittis libero lacinia Integer consequat ac Phasellus. Et urna ac cursus tortor aliquam Aliquam amet tellus volutpat Vestibulum. Justo interdum condimentum In augue congue tellus sollicitudin Quisque quis nibh."';
Note: See TracChangeset for help on using the changeset viewer.