If you modify the css or js file, it still tells the browser to use the one it has in the cache.

0 views
Skip to first unread message

ide...@gmail.com

unread,
Jun 26, 2007, 6:18:36 AM6/26/07
to jscsscomp
The problem is the variable $newestfile, it should be changed with
$lmt

code:
......
// For an additional layer of protection we'll see if the browser
// sent us a last-modified date and compare that with $newestFile
// If there's no change we'll send a cache control header and die.

if (isset($headers['If-Modified-Since'])) {
if ($lmt <= strtotime($headers['If-Modified-Since'])) { // <----
here
// No change so send a 304 header and terminate
header('Last-Modified: '.$lmt_str.' GMT', true, 304);
exit;
}
}

Reply all
Reply to author
Forward
0 new messages