com web/php: Actually cache the page for a month: cached.php
| From: | Hannes Magnusson | Date: | Mon, 10 Mar 2014 17:35:14 +0000 |
| Subject: | com web/php: Actually cache the page for a month: cached.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-18453@lists.php.net to get a copy of this message | ||
Commit: d807946a2456f6faa1762e37b6b641b86e7f4027
Author: Hannes Magnusson <bjori@mongodb.com> Mon, 10 Mar 2014 10:34:40 -0700
Parents: 7c7da0fa4cc5b12472f2a19cec5b3b17eea1df5b
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=d807946a2456f6faa1762e37b6b641b86e7f4027
Log:
Actually cache the page for a month
Changed paths:
M cached.php
Diff:
diff --git a/cached..php b/cached.php
index 99cda6a..6793c04 100644
--- a/cached.php
+++ b/cached.php
@@ -30,6 +30,7 @@ if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"]) &&
}
header("Last-Modified: " . $tsstring);
+header("Cache-Control: no-transform,public,max-age=2678400,s-maxage=2678400");
if (substr($abs, -3) == ".js" || substr($abs, -5) == ".json") {
header("Content-Type: application/javascript");