comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:d2da64705bce
1 <?php
2 $if_modified_since = preg_replace('/;.*$/', '', $HTTP_IF_MODIFIED_SINCE);
3
4 $mtime = filemtime($SCRIPT_FILENAME);
5 $gmdate_mod = gmdate('D, d M Y H:i:s', $mtime) . ' GMT';
6
7 if ($if_modified_since == $gmdate_mod) {
8 header("HTTP/1.0 304 Not Modified");
9 exit;
10 }
11 header("Last-Modified: $gmdate_mod");
12 ?>