| @@ -46,9 +46,8 @@ | ||
| 46 | 46 | |
| 47 | 47 | $eTag=md5($contents); |
| 48 | 48 | $modTime=filemtime(__FILE__.'.none'); |
| 49 | 49 | |
| 50 | -date_default_timezone_set("UTC"); | |
| 51 | 50 | $eTagMatch = (isset($_SERVER['HTTP_IF_NONE_MATCH']) && strpos($_SERVER['HTTP_IF_NONE_MATCH'],$eTag)); |
| 52 | 51 | $modTimeMatch = (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) === $modTime); |
| 53 | 52 | |
| 54 | 53 | if (($modTimeMatch)||($eTagMatch)) { |
| @@ -62,9 +61,9 @@ | ||
| 62 | 61 | } |
| 63 | 62 | header('Vary: Accept-Encoding'); |
| 64 | 63 | header('Content-Length: '.strlen($contents)); |
| 65 | 64 | header('Content-type: %%CONTENT%%; charset=utf-8'); |
| 66 | - header('Cache-Control: max-age='.$expireTime.', public, immutable'); | |
| 65 | + header('Cache-Control: max-age='.$expireTime.', public, must-revalidate'); | |
| 67 | 66 | header('Expires: '.gmdate('D, d M Y H:i:s', time() + $expireTime).' GMT'); |
| 68 | 67 | header('ETag: ' . $eTag); |
| 69 | 68 | header('Last-Modified: '.gmdate('D, d M Y H:i:s', $modTime).' GMT'); |
| 70 | 69 | |