From 66510e20d36cb8da4f3012ef063de7bfce9b51aa Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Wed, 09 May 2012 07:52:28 -0400 Subject: [PATCH] Merge pull request #1 from Brianetta/de-svn --- program/include/rcube_output.php | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/program/include/rcube_output.php b/program/include/rcube_output.php index 4a51b5e..e1d5e43 100644 --- a/program/include/rcube_output.php +++ b/program/include/rcube_output.php @@ -237,6 +237,21 @@ } } + /** + * Send header with expire date 30 days in future + * + * @param int Expiration time in seconds + */ + public function future_expire_header($offset = 2600000) + { + if (headers_sent()) + return; + + header("Expires: " . gmdate("D, d M Y H:i:s", time()+$offset) . " GMT"); + header("Cache-Control: max-age=$offset"); + header("Pragma: "); + } + /** * Show error page and terminate script execution -- Gitblit v1.9.1