X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl.git;a=blobdiff_plain;f=http.php;h=2907410ffe4b703e321e7af4573f4be2c9a8884e;hp=1fad97b2c8f1dd63c057aeda70e87597fbea25b3;hb=HEAD;hpb=2d5f29a71d618171393a7cc46d6eba6b0346e516 diff --git a/http.php b/http.php index 1fad97b..2907410 100644 --- a/http.php +++ b/http.php @@ -1,27 +1,14 @@ +# output http headers to allow caching of this page forever +function http_cache_forever($cache_control = 'public') { + header('Last-Modified: '.gmdate('D, d M Y H:i:s', 5025) . ' GMT'); # long time ago + header("Cache-Control: $cache_control"); + header('Expires: ' . gmdate('D, d M Y H:i:s',time()+31536000) . ' GMT'); # rfc 2616 says not to go more than a year in the future +}