From 4d78085a3c9b4e85fd3882e96601557a70a11e96 Mon Sep 17 00:00:00 2001 From: Joshua Seigler Date: Sun, 26 Jun 2016 13:25:51 -0400 Subject: [PATCH] add EXPIRES header so that browsers can use built-in caching rules --- buffer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buffer.php b/buffer.php index 262d7f2..588964e 100644 --- a/buffer.php +++ b/buffer.php @@ -40,6 +40,7 @@ } // if so, display cache file and stop processing + header("Expires: ".gmdate("D, d M Y H:i:s", $last_modified_time + CACHE_TIME)." GMT"); readfile($file); exit; } @@ -57,6 +58,7 @@ // always send headers header("Last-Modified: ".gmdate("D, d M Y H:i:s", $last_modified_time)." GMT"); header("Etag: $etag"); + header("Expires: ".gmdate("D, d M Y H:i:s", $last_modified_time + CACHE_TIME)." GMT"); return $content; }