diff cache_check.inc @ 0:d2da64705bce

Refactored everything in the CMS into this repos.
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Tue, 10 May 2011 14:01:34 +0200
parents
children 6c0162497d56
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cache_check.inc	Tue May 10 14:01:34 2011 +0200
@@ -0,0 +1,12 @@
+<?php
+$if_modified_since = preg_replace('/;.*$/', '', $HTTP_IF_MODIFIED_SINCE);
+
+$mtime = filemtime($SCRIPT_FILENAME);
+$gmdate_mod = gmdate('D, d M Y H:i:s', $mtime) . ' GMT';
+
+if ($if_modified_since == $gmdate_mod) {
+    header("HTTP/1.0 304 Not Modified");
+    exit;
+}
+header("Last-Modified: $gmdate_mod");
+?>
\ No newline at end of file