[thelist] cookies in perl/cgi
John Snippe
design at cybernautica.com
Mon Jul 24 08:26:22 CDT 2000
On 7/24/00, regarding " Re: [thelist] cookies in perl/cgi ", Adrian
Fischer offered the following:
>Again ..thanks Anthony,
>
>I finally got it so that I can set a cookie but I want it to expire when the
>browser is closed. I am setting using the date as you suggested :
>print "Set-Cookie: approved=YES; expires=Tue-25-Jul-2000 00:00:00 GMT;
>
>Could you please explain the format for getting it to expire when the
>browser closes?
>
>> #Setting Cookie
>> print "Content-type: text/html\n";
>> print "Set-Cookie: CookieName=Value; expires=$varGMTExpireDate
>GMT;path=/; \n\n";
>
>
>Geeze...I hope I can sort out how to read the cookie easier than I managed
>to work out how to set it.
Not betting the house on my answer here: don't set an expiration time at
all. That will kill the cookie at the end of the browser session.
More information about the thelist
mailing list