From a2e2bf643a3b82c57c88a25c2b849b94952316b4 Mon Sep 17 00:00:00 2001 From: nfreear Date: Fri, 7 Apr 2006 10:18:03 +0000 Subject: [PATCH] Fix MB 5099, "Make CSS requests expire in IE", fix 'max-age=' as per http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html, override $lastmodified parameter (OU-Bugz: 851) --- lib/weblib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/weblib.php b/lib/weblib.php index 56fab91788..27da4fa2d2 100644 --- a/lib/weblib.php +++ b/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 -- 2.39.5