Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cookie expiration

Status
Not open for further replies.

xspanner

Programmer
Jan 16, 2002
29
0
0
RO
The cookie which I set does not expire at the time which i ment to at all!

For example if I set a cookie :
SetCookie("cookie_1","cookie_one",time()+300),
it should expire in 5 minutes if I am right, but it expires in 6 seconds.

If I set to time()+600 it expires in 7 minutes, which if I am right should expire in 10 minutes.

What should I do?
Please anyone help me!!
THNX
 
Timing differences in cookie timeout have often to do with the difference between client and server time.
Mozilla for example gets server time with the cookie while IE uses the local time. So if they are off cookies expire unexpected.

Also, make sure that you don't confuse cookie expiration with an unavailable cookie. In your example you do not specify domain and path. It is always best to specify all parameters when setting cookies.

 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top