Page is a not externally linkable
- Google
-- Google SEO News and Discussion
---- Google crawl - not always sending IF_MODIFIED_SINCE


jd01 - 8:35 pm on Oct 10, 2007 (gmt 0)


I usually set a 'future expires' and check for both an HTTP_IF_MODIFIED_SINCE and HTTP_IF_NONE_MATCH.

header("Expires: " . gmdate("D, d M Y H:i:s", time()+24*60*60) . " GMT");

if($_SERVER['HTTP_IF_MODIFIED_SINCE']===$date ¦¦ $_SERVER['HTTP_IF_NONE_MATCH']===$etag) {
header('HTTP/1.1 304 Not Modified'); exit();
}

I use a simple md5 hash based on URL / filemtime() to create custom ETag headers and ensure if I update the file a new request is made.

The order in the file should be reversed...
The Expires is created and set only if there is no match to either header, and needs to be set before any other output.

Justin


Thread source:: http://www.webmasterworld.com/google/3275018.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com