Code: Select all
#Do cache-control stuff
if (function_exists('getallheaders'))
$headers = getallheaders();
else
$headers = emu_getallheaders();
$hash = md5($html);
#if browser sent etag and it is the same then reply with 304
if (isset($headers['If-None-Match']) && $headers['If-None-Match'] == '"'.$hash.'"')
{
header('HTTP/1.1 304 Not Modified');
exit;
}
else
{
header('ETag: "'.$hash.'"');
};
echo $html;
What's puzzling me is that this works just fine for Firefox, but MSIE just doesn't take any notice. IE just doesn't send the "If-None-Match:" header the second time it fetches a page, even though it all works just fine for style sheets.
Has anyone got content caching to work in IE ?