Connecting Tech Pros Worldwide Forums | Help | Site Map

Problem with cookie in cache

Newbie
 
Join Date: May 2007
Location: Pakistan
Posts: 17
#1: Aug 21 '07
Hi All, Can anyone help me on this issue.

Actually I store information in a cookie but the problem is when the page is reloaded it gets the old values from cache and many things are not updated unless I remove cache by pressing Ctrl And F5 keys in IE and same for Mozilla. Is there a way for a page to get always new values from cookies or cache and let the website updated?
Thanks in advance.

Member
 
Join Date: May 2007
Posts: 58
#2: Aug 21 '07

re: Problem with cookie in cache


Am still learning php myself,but I can suggest you try this:
Expand|Select|Wrap|Line Numbers
  1. <meta http-equiv="pragma" content="no-cache" />
  2. <meta http-equiv="Expires" content="Mon, 01 Jan 1990 12:00:00 GMT">
  3.  
between <head> and </head>

If you are using redirects,you may want to add the following before your actual header:

[php]

header( "Cache-Control: no-cache, must-revalidate" );
[/php]

Still,if you are curious on handling cache for sessions,have a look at :
[php]
session-cache-limiter
[/php]
http://www.php.net/manual/en/functio...he-limiter.php

Hope this will be of help to your issue
Newbie
 
Join Date: May 2007
Location: Pakistan
Posts: 17
#3: Aug 22 '07

re: Problem with cookie in cache


Dear thank you for your reply I try this.
Thanks in Advance
Reply