From 00a68572754351dcc7e6aab1e47fbcc0f2a42c8d Mon Sep 17 00:00:00 2001 From: kink Date: Sun, 29 Jan 2006 12:12:17 +0000 Subject: [PATCH] output a last-modified date if known; should prevent stylesheet from being refetched on every pageload git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10609 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/style.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/style.php b/src/style.php index 7d7976bd..913425dd 100644 --- a/src/style.php +++ b/src/style.php @@ -173,7 +173,12 @@ if (! sqgetGlobalVar('fontsize',$fontsize,SQ_GET)) { $oTemplate->assign('fontsize', $fontsize); header('Content-Type: text/css'); +// output a last-modified header if we can +if ( $lastmod = @filemtime($oTemplate->template_dir . 'stylesheet.tpl') ) { + $gmlastmod = gmdate('D, d M Y H:i:s', $lastmod) . ' GMT'; + header('Last-Modified: ' . $gmlastmod); +} $oTemplate->display('stylesheet.tpl'); -?> \ No newline at end of file +?> -- 2.25.1