Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix MB 5099, "Make CSS requests expire in IE", fix 'max-age=' as per h…

…ttp://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html, override $lastmodified parameter (OU-Bugz: 851)
  • Loading branch information...
commit a2e2bf643a3b82c57c88a25c2b849b94952316b4 1 parent 78a71c3
nfreear authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/weblib.php
View
5 lib/weblib.php
@@ -2177,9 +2177,12 @@ function style_sheet_setup($lastmodified=0, $lifetime=300, $themename='', $force
global $CFG, $THEME;
+ // Fix for IE6 caching - we don't want the filemtime('styles.php'), instead use now.
+ $lastmodified = time();
+
header('Last-Modified: ' . gmdate("D, d M Y H:i:s", $lastmodified) . ' GMT');
header('Expires: ' . gmdate("D, d M Y H:i:s", time() + $lifetime) . ' GMT');
- header('Cache-control: max_age = '. $lifetime);
+ header('Cache-Control: max-age='. $lifetime);
header('Pragma: ');
header('Content-type: text/css'); // Correct MIME type
Please sign in to comment.
Something went wrong with that request. Please try again.