From d9189956efa633606995b1b8c33159a8ea0c444f Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Tue, 31 May 2005 13:55:20 +0000 Subject: [PATCH] Remove Cache-restricting headers to allow caching of the CSS --- docs/NEWS | 4 ++++ serendipity.css.php | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/docs/NEWS b/docs/NEWS index 2de06b0..dc7ea22 100644 --- 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 diff --git a/serendipity.css.php b/serendipity.css.php index 736ecd4..2cf4bce 100644 --- a/serendipity.css.php +++ b/serendipity.css.php @@ -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'); -- 2.39.5