| @@ -36,9 +36,8 @@ | ||
| 36 | 36 | // first check if we have to send 304 |
| 37 | 37 | $eTag=md5($contents); |
| 38 | 38 | $modTime=filemtime(__FILE__.'.none'); |
| 39 | 39 | |
| 40 | -date_default_timezone_set("UTC"); | |
| 41 | 40 | $eTagMatch = (isset($_SERVER['HTTP_IF_NONE_MATCH']) && strpos($_SERVER['HTTP_IF_NONE_MATCH'],$eTag)); |
| 42 | 41 | $modTimeMatch = (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) === $modTime); |
| 43 | 42 | |
| 44 | 43 | if (($modTimeMatch)||($eTagMatch)) { |
| @@ -54,9 +53,9 @@ | ||
| 54 | 53 | } |
| 55 | 54 | header('Vary: Accept-Encoding'); |
| 56 | 55 | header('Content-Length: '.strlen($contents)); |
| 57 | 56 | header('Content-type: %%CONTENT%%; charset=utf-8'); |
| 58 | - header('Cache-Control: max-age='.$expireTime.', public, immutable'); | |
| 57 | + header('Cache-Control: max-age='.$expireTime.', public, must-revalidate'); | |
| 59 | 58 | header('Expires: '.gmdate('D, d M Y H:i:s', time() + $expireTime).' GMT'); //10 years |
| 60 | 59 | header('ETag: ' . $eTag); |
| 61 | 60 | header('Last-Modified: '.gmdate('D, d M Y H:i:s', $modTime).' GMT'); |
| 62 | 61 | |