Hi all
I can't work out why no value is being passed from the client for If-Modified-Since...
This is the code:
session_cache_limiter("private");
$intWeek = time() + 604800;
$expires_mod = gmdate('D, d M Y H:i:s', $intWeek) . ' GMT';
header ("Expires: $expires_mod");
header ("Cache-Control: public");
( ...random db stuff here... )
( ... $rowHist now contains the date of the last update to relevant tables ... )
$dtLastChange = strtotime($rowHist["last_change"]);
$dtLastView = strtotime($HTTP_IF_MODIFIED_SINCE);
//If the numbers haven't been updated since the last view, send a 304 header
if ($dtLastChange == $dtLastView) {
Header("HTTP/1.1 304 Not Modified");
print("<br>304 here!");
// exit;
} else {
Header("Last-Modified: $gmdate_mod");
print("<br>Last Modified here!.... $gmdate_mod");
}
The problem is that no value ever arrives for $HTTP_IF_MODIFIED_SINCE... What could be the problem?
Thanks,
Andy