mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user