Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Removing cookies

by drfrog (Deacon)
on Jun 30, 2003 at 20:49 UTC ( [id://270320]=note: print w/replies, xml ) Need Help??


in reply to Removing cookies

above is ok for removing cookie at end of browser session
if however you want the cookie to expire on script completion try sending the cookies value as '' in the header with same name
my $cookie = new CGI::Cookie(-name=>'cookie',-value=>''); print $q->header(-type=>'text/html', -cookie=>$cookie );
im not sure about by domain either.. although a perl script on a domain can only effect those cookies set by that domain as far as i can recall

Replies are listed 'Best First'.
Re: Re: Removing cookies
by cbro (Pilgrim) on Jun 30, 2003 at 20:56 UTC
    Not setting an expire at all is good for deleting cookies when the browser session ends. Setting expire to a negative value will delete the cookie during the current browser session if it has been set at some other time (or during the current session). Either way, I realized after I posted that the author of this node most likely knows this already, and is only interested in deleting by domain name.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://270320]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-24 12:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found