 |
boardom b2 message board
|
View previous topic :: View next topic |
Author |
Message |
roofdog
Joined: 25 Jul 2002 Posts: 25
|
Posted: Tue Jan 28, 2003 3:32 am Post subject: cookie/cache issue? |
|
|
hello,
when i look at my weblog, which is at http://members.lycos.co.uk/roofdog/weblog.php , i often see a very outdated version of the page. i am aware this is due to my browser, but is there anything i can do which will 'force' the page to be updated to the very latest version, in other words make sure that the user sees the latest page and not a cached version which could be out of date?
thanks
roofdog |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Tue Jan 28, 2003 5:18 am Post subject: |
|
|
Hi,
Let's try and stop the caching at least in the browser.... see further down for a real story..
In blog.header.php you should find one of the two code segments below:
Code: |
/* Sending HTTP headers */
$last_modified_header = mysql2date('D, d M Y H:i:s', get_lastpostdate());
@header ("X-Pingback: $pathserver/xmlrpc.php");
@header ("Last-Modified: $last_modified_header");
@header ('ETag: "'.md5($last_modified_header.$pagenow).'"');
|
-- OR --
Code: |
/* Sending HTTP headers */
$last_modified_header = mysql2date('D, d M Y H:i:s', get_lastpostdate());
@header ("X-Pingback: $pathserver/xmlrpc.php");
if (!$is_winIE) {
@header ("Last-Modified: $last_modified_header");
@header ('ETag: "'.md5($last_modified_header.$pagenow).'"');
}
|
lets make this code look like this
Code: |
/* Sending HTTP headers */
$last_modified_header = mysql2date('D, d M Y H:i:s', get_lastpostdate());
@header ("X-Pingback: $pathserver/xmlrpc.php");
@header("Cache-Control: no-cache, must-revalidate");
@header("Pragma: no-cache");
|
This will attempt to tell the browser to not cache it and it must be re-validated and to try and set the browser to a no cache condition. Yes I know it sounds the same, but both are needed to cover all the bases. (At least I think so )
But this may not be the whole story. An associate of mime very recently had a condition with his cable company/isp that had, in my words, a rouge caching server. No mater what he did, he got the old pages. He even went so far as to delete the complete site, confirmed by ftp, and me. But when he went to the site with the browser(s) on multiple machines(s), he got the old site. Now this went on for about 2 weeks, and then a "miraculous" event occurred and things are now fine. We each lost a few hairs trying to prove this issue was the cable company/isp and not the local systems (to which they never admited but denied.)
Try the above. I tested it here on my local server and did not have any issues, but your never know.
Oh, if your blog.header.php file looks like the first set, you might just try the second set to see if that helps. The second set is what has been transmited to CVS.
Kind regards,
Michael e |
|
Back to top |
|
 |
roofdog
Joined: 25 Jul 2002 Posts: 25
|
Posted: Fri Jan 31, 2003 9:03 pm Post subject: hey |
|
|
cool,
thanks for this. so, i find both of the sections quoted above and change them? or just change one of them? or IS there only one?
roofdog |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Fri Jan 31, 2003 9:28 pm Post subject: |
|
|
Hi roofdog,
If your bolg.header.php has the first set of code, you might try changing it to the second set.
If your code is already at the second set, then do the last and see.
My gess is your blog.header.php looks like the first set, so try the second set and see if that solves the problem. Oh, this is only true if you're using M$ IE.
Any clearer?
Kind regards,
michael e |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB 2 © 2001, 2002 phpBB Group
|