MDL-32683 explicitly allow more caching of static content

This commit is contained in:
Petr Skoda
2012-05-05 14:09:31 +02:00
parent e16e2300c5
commit 8c672cf9f3
6 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -59,7 +59,7 @@ if ($rev > -1 and file_exists($candidate)) {
$lifetime = 60*60*24*30; // 30 days
header('HTTP/1.1 304 Not Modified');
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
header('Cache-Control: max-age='.$lifetime);
header('Cache-Control: public, max-age='.$lifetime);
header('Content-Type: application/javascript; charset=utf-8');
die;
}
@@ -108,7 +108,7 @@ function send_cached_js($jspath) {
header('Last-Modified: '. gmdate('D, d M Y H:i:s', filemtime($jspath)) .' GMT');
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
header('Pragma: ');
header('Cache-Control: max-age='.$lifetime);
header('Cache-Control: public, max-age='.$lifetime);
header('Accept-Ranges: none');
header('Content-Type: application/javascript; charset=utf-8');