Sorry for the probably wrong title. I am writing some code to handle If-Modified-Since and If-None-Match requests as part of caching. Everything works perfect except for tha
Try this code:
$last_modified = filemtime($f); if(isset($_SERVER["HTTP_IF_MODIFIED_SINCE"])) { $expected_modified = strtotime(preg_replace('/;.*$/','',$_SERVER["HTTP_IF_MODIFIED_SINCE"])); if($last_modified <= $expected_modified) { header("HTTP/1.0 304 Not Modified"); exit; } }