boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

cookie/cache issue?

 
Post new topic   Reply to topic    boardom Forum Index -> How to ?
View previous topic :: View next topic  
Author Message
roofdog



Joined: 25 Jul 2002
Posts: 25

PostPosted: Tue Jan 28, 2003 3:32 am    Post subject: cookie/cache issue? Reply with quote

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
View user's profile Send private message Visit poster's website
macshack



Joined: 17 Jul 2002
Posts: 1204
Location: Phoenix, Az

PostPosted: Tue Jan 28, 2003 5:18 am    Post subject: Reply with quote

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 Smile )

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
View user's profile Send private message Send e-mail
roofdog



Joined: 25 Jul 2002
Posts: 25

PostPosted: Fri Jan 31, 2003 9:03 pm    Post subject: hey Reply with quote

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
View user's profile Send private message Visit poster's website
macshack



Joined: 17 Jul 2002
Posts: 1204
Location: Phoenix, Az

PostPosted: Fri Jan 31, 2003 9:28 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> How to ? All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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