From: kink Date: Sun, 29 Jan 2006 12:12:17 +0000 (+0000) Subject: output a last-modified date if known; should prevent stylesheet from being X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=00a68572754351dcc7e6aab1e47fbcc0f2a42c8d;p=squirrelmail.git 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 --- 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 +?>