Re[2]: [PHP] Help me to win the battle with browser's cache
Hello Girish, Monday, November 12, 2001, 4:29:55 PM, you wrote: GN> Hi GN> I've found some code which i put it into this function. I've never got the GN> meta tag technique to work but this seems to do the trick. GN> Call noCache() before outputting anything to the page. GN> function noCache() { GN> header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");// Date in the past GN> header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always GN> modified GN> header ("Cache-Control: no-cache, must-revalidate"); file://HTTP/1.1 GN> header ("Pragma: no-cache"); // HTTP/1.0 GN> } Thanks! That's what I've been looking for. But there is something wrong with this headers. I pasted the code above, and peges really stopped loading from cache. But... I tested it with IE 5.5 SP2 and Netscape 4.77 (I don't use Netscape 6.x because it's just useless cputime eater). The page works fine with Navigator, but IE shows blank page each time I click a link. It shows the page properly only after clicking Refresh. I remember I have the same problem 1/2 year ago when I was unsuccesfully tried to win the battle with the browser cache :). Now I commented the 3rd header (with "cache-control"), and now IE works perfect too. I don't know why it works on your pages :). The problem is not in my personal IE because the same problem was (as I said) whan I used IE 5.0. So, if there are some people who have the same problem, I would suggest to put these 3 lines on the top of the page: header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); header("Pragma: no-cache"); Thanks to Girish and others who tried to help me! P.S. There can be another problem: client's clock. If it's 20 Jan 1985 on client's machine, than ... Do you think I can put in the first header some very old date like 1 Jan 1970? I just want it to work in any case. -- Best regards, Olexandrmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Help me to win the battle with browser's cache
Hi I've found some code which i put it into this function. I've never got the meta tag technique to work but this seems to do the trick. Call noCache() before outputting anything to the page. function noCache() { header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");// Date in the past header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header ("Cache-Control: no-cache, must-revalidate"); file://HTTP/1.1 header ("Pragma: no-cache"); // HTTP/1.0 } Regards Girish - Original Message - From: "Olexandr Vynnychenko" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 12, 2001 1:32 PM Subject: [PHP] Help me to win the battle with browser's cache > Hello php-general, > > I have index.php, which has Log out. > When I click it, I am logged out the site. But I type "index.php" in > browser's address bar, press Enter and ... it shows "non-logouted" > page. What should I write in php code to tell browser something like > "forget about old page, don't display it, get the newest version"? > Some time ago I tried to do that in several ways and nothing gived > 100% result. And other thing I saw was that Netscape and Explorer > behave in different ways in such cases. Could someone help me? Maybe > this topic was discussed before, but still... I appreciate greatly > any suggestion. > > -- > Olexandr Vynnychenko mailto:[EMAIL PROTECTED] > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Help me to win the battle with browser's cache
Hi, me also faced many probs last 3 months back and i overcome that. solution - use session variables.. register login info as session vars and during logout unregister... This is the solution to u'r problem.. - All the best -Balaji - Original Message - From: "Olexandr Vynnychenko" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 12, 2001 7:02 PM Subject: [PHP] Help me to win the battle with browser's cache Hello php-general, I have index.php, which has Log out. When I click it, I am logged out the site. But I type "index.php" in browser's address bar, press Enter and ... it shows "non-logouted" page. What should I write in php code to tell browser something like "forget about old page, don't display it, get the newest version"? Some time ago I tried to do that in several ways and nothing gived 100% result. And other thing I saw was that Netscape and Explorer behave in different ways in such cases. Could someone help me? Maybe this topic was discussed before, but still... I appreciate greatly any suggestion. -- Olexandr Vynnychenko mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Help me to win the battle with browser's cache
Hello php-general, I have index.php, which has Log out. When I click it, I am logged out the site. But I type "index.php" in browser's address bar, press Enter and ... it shows "non-logouted" page. What should I write in php code to tell browser something like "forget about old page, don't display it, get the newest version"? Some time ago I tried to do that in several ways and nothing gived 100% result. And other thing I saw was that Netscape and Explorer behave in different ways in such cases. Could someone help me? Maybe this topic was discussed before, but still... I appreciate greatly any suggestion. -- Olexandr Vynnychenko mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]