MDL-32683 explicitly allow more caching of static content
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user