in reply to Cookie time again *eats cookie*

So you plan to have your computer on for two years without interruption ;-)

"The cookie will be saved and returned to your script until this expiration date is reached if the user exits the browser and restarts it."

This is copied and pasted from CGI doc, which should actually read:

"The cookie will be saved and returned to your script until this expiration date is reached ,or if the user exits the browser and restarts it."

Hope it is now more clear to you. You are ealing with one type of cookie, called session cookie.

Update:

castaway's answer is much better!

Replies are listed 'Best First'.
Re: Re: Cookie time again *eats cookie*
by bart (Canon) on Dec 27, 2003 at 21:42 UTC
    "The cookie will be saved and returned to your script until this expiration date is reached ,or if the user exits the browser and restarts it."
    That is so untrue. Under normal circumstances, the browser saves the cookie to disk, and it will be used until the expiration date has passed — unless the user deletes it, of course. Restarting the browser, or the computer, won't make a difference.

    If you want a cookie to last only until the browser is closed, don't provide an expiration date.

    p.s. An expiration date in the past will delete the cookie.

Re: Re: Cookie time again *eats cookie*
by sulfericacid (Deacon) on Dec 27, 2003 at 19:44 UTC
    That really wasn't the question, I know cookies are gone the minute the window is closed, but I don't see why they're gone when it's in the same browser window. All I'm doing is clicking ENTER in the location bar after I supposively have a cookie, and it's not sticking.


    "Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

    sulfericacid