]> git.mjollnir.org Git - s9y.git/commitdiff
Remove Cache-restricting headers to allow caching of the CSS
authorgarvinhicking <garvinhicking>
Tue, 31 May 2005 13:55:20 +0000 (13:55 +0000)
committergarvinhicking <garvinhicking>
Tue, 31 May 2005 13:55:20 +0000 (13:55 +0000)
docs/NEWS
serendipity.css.php

index 2de06b0529c899e5a8e5571dcc258259dcb58d92..dc7ea228d9e9eed0131fa70d27cd8a29fa91856b 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -85,6 +85,10 @@ Version 0.9 ()
 Version 0.8.2 ()
 ------------------------------------------------------------------------
 
+    * CSS does no longer emit cache-restricting headers, so that the
+      stylesheets can be cached by the browser for followup-requests
+      Thanks to Sencer for pointing this out! (garvinhicking)
+
     * Patch/Bug #1209410 by swiesinger: When using shortcut admin URL,
       use https:// when specified by user
 
index 736ecd4122bd816e22f3a28eba249489a1e73700..2cf4bcec03ac206161dfb43554f19617418339f0 100644 (file)
@@ -6,6 +6,7 @@
 define('IN_installer', true);
 define('IN_upgrader', true);
 
+session_cache_limiter('public');
 include_once('serendipity_config.inc.php');
 
 if (!isset($css_mode)) {
@@ -48,6 +49,10 @@ function serendipity_printStylesheet($file) {
 
 if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
     header('Cache-Control: no-cache');
+} else {
+    header('Cache-Control:');
+    header('Pragma:');
+    header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time()+3600));
 }
 header('Content-type: text/css');