X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=http.php;h=2907410ffe4b703e321e7af4573f4be2c9a8884e;hb=dfb559a8ce4e04d8e5f27f8587141e97f9af1a59;hp=b183275e1ef12b97823eed07b8d1c15275dc4267;hpb=d03e8554ee3e80a6333126e67dd4c20f54ec700e;p=wfpl.git diff --git a/http.php b/http.php index b183275..2907410 100644 --- a/http.php +++ b/http.php @@ -1,35 +1,19 @@ +# 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 +}