diff --git a/wp-admin/cat-js.php b/wp-admin/cat-js.php index 08393b7d1..c286168c7 100644 --- a/wp-admin/cat-js.php +++ b/wp-admin/cat-js.php @@ -1,6 +1,6 @@ addLoadEvent(function(){catList=new listMan('categorychecklist');catList.ajaxRespEl='jaxcat';catList.topAdder=1;catList.alt=0;catList.showLink=0;}); addLoadEvent(newCatAddIn); diff --git a/wp-admin/dbx-admin-key-js.php b/wp-admin/dbx-admin-key-js.php index bca04cec8..f47e53b90 100644 --- a/wp-admin/dbx-admin-key-js.php +++ b/wp-admin/dbx-admin-key-js.php @@ -1,6 +1,6 @@ addLoadEvent(function(){theList=new listMan();}); diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 544427fca..050f3469a 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -737,6 +737,13 @@ function nocache_headers() { @ header('Pragma: no-cache'); } +function cache_javascript_headers() { + $expiresOffset = 864000; // 10 days + header("Content-type: text/javascript; charset=" . get_bloginfo('charset')); + header("Vary: Accept-Encoding"); // Handle proxies + header("Expires: " . gmdate("D, d M Y H:i:s", time() + $expiresOffset) . " GMT"); +} + function get_num_queries() { global $wpdb; return $wpdb->num_queries; diff --git a/wp-includes/js/autosave.js.php b/wp-includes/js/autosave.js.php index 811ec6c79..4db6ff9ea 100644 --- a/wp-includes/js/autosave.js.php +++ b/wp-includes/js/autosave.js.php @@ -1,11 +1,5 @@ var autosaveLast = ''; function autosave_timer() {