Commit c6f8434f authored by Leigh Stoller's avatar Leigh Stoller

Change caching directives. Used to be that all of the pages we spit

out included directives to prevent caching along the way. Now we look
at the protocol (http vs https) and include directives that allow
(encourage) http pages to be cached for a short time. My reasoning is
that anything we spit out via http is documentation, and can grow a
bit stale. Sure, the menu on the left is dynamic, but not so dynanic
that it can't go a little stale too for people who are not logged in.
parent 91e365dc
......@@ -420,10 +420,16 @@ function PAGEHEADER($title) {
$login_status = $STATUS_NOLOGINS;
}
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
if (isset($SSL_PROTOCOL)) {
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
}
else {
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 300) . " GMT");
}
echo "<html>
<head>
......@@ -461,11 +467,6 @@ function PAGEHEADER($title) {
<meta NAME=\"ROBOTS\" CONTENT=\"NOARCHIVE\">\n";
}
echo " <meta HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">
<meta HTTP-EQUIV=\"Cache-Control\" CONTENT=\"no-cache\">
<meta HTTP-EQUIV=\"Expires\"
CONTENT=\"Thu, 01 Dec 1994 16:00:00 GMT\">\n";
# echo " <meta HTTP-EQUIV=\"Cache-Control\"
# CONTENT=\"post-check=30,pre-check=60\">\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment