Cookie expires at end of session

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am using a session to store user info and a cookie to store their
username.  When the user returns to the site I would like the username
to be loaded from the cookie but it expires as soon as you close the
browser.  How can I stop the cookie from expiring when the browser


Thanks in advance.

Re: Cookie expires at end of session


Setting the expiration time should do it. May want to double-check the
cookie path and domain.

You could also check if the client is overriding this behavior. For
example, Firefox has an option called "Keep Cookies until I close
Firefox" (Tools -> Options -> Privacy -> Cookies) which could interfere
with this.

T.Taylor wrote:
Quoted text here. Click to load it

Site Timeline