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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31029 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-01-03 02:56:14 +00:00
parent 8476a2e2fa
commit d5328fc674
3 changed files with 3 additions and 3 deletions

View File

@@ -143,7 +143,7 @@ foreach( $load as $handle ) {
$out .= get_file($path) . "\n";
}
header('Content-Type: application/x-javascript; charset=UTF-8');
header('Content-Type: application/javascript; charset=UTF-8');
header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
header("Cache-Control: public, max-age=$expires_offset");