...

View Full Version : Cache problem



digits4554
10-12-2004, 12:29 PM
Previously the server was standalone and i was able to disable the cache and handle in PHP code... Now when i put the server behind LoadBalancer, all the site pages get cached.. like, say

when i click edit profile from member page and after editing and submit, i show a success page and redirect back to member page and again if i click it will show the edit page.. it was working fine when the server was out of LoadBalancer. But when i put inside LB, then after first time of editing whenever i click the edit profile the page directly goes to success page and redirects to Member page without showing the edit page...

How can i fix this ?

Digits

fci
10-14-2004, 07:29 AM
maybe send the headers for no cache?
try putting this at the top of your code


header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header('Pragma: no-cache');


mmm
and so I googled a bit and someone posted this article..
http://www.phpbuilder.com/tips/item.php?id=123

let us know how it goes.

edit:
and found this post that was made:
http://www.phpbuilder.com/annotate/message.php3?id=1003107


Subject: 3 lines will handle IE 5.x, Netscape 4.x, etc

header("Cache-Control: private");
header("Cache-Control: no-cache");
header("Pragma: no-cache");

That's it.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum