|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
I'm writing a Perl CGI script that allows users to login using a web form then stores their password in a temporary cookie. No problems with that.
I'm also aware that this cookie will be deleted when the user closes their browser, as it's been set without an expiration date. However, I'd like to find a way of deleting the cookie from within a script, allowing an explicit "log out" function on the site, rather than depending on the user shutting down their browser to delete the cookie. Web mail providers seem to do something like this, though whether they're using the same technology I don't know. Any ideas? |
|
#2
|
|||
|
|||
|
I'm not really sure about this, but I've heard that if you send a cookie with the same name, but an expired expiration date, it will overwrite the old cookie, and then the browser will delete it because it has expired.
|
|
#3
|
|||
|
|||
|
Just so you know, I went ahead and tested it and it worked fine for me.
|
|
#4
|
|||
|
|||
|
Many thanks for your help. I tried it and it works fine.
Like most things, the answer is almost obvious once you know it! :-)) |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > How to delete a cookie from a script? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|