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
+1 -1
View File
@@ -21,7 +21,7 @@ function get_file($path) {
$expires_offset = 31536000; // 1 year
header('Content-Type: application/x-javascript; charset=UTF-8');
header('Content-Type: application/javascript; charset=UTF-8');
header('Vary: Accept-Encoding'); // Handle proxies
header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
header("Cache-Control: public, max-age=$expires_offset");