Hello -
I managed to get a cookie set. Now I want to delete it but it is not
working.
Do I need to do another 'set-cookie' in the HTTP header? I tried
(code below setting expires to 0) and it didn't work.
c = Cookie.SimpleCookie(os.environ[HTTP_COOKIE])
c[mycook][expires] = 0
print c
In case
On Jan 8, 9:16 am, tryg.ol...@gmail.com wrote:
Hello -
I managed to get a cookie set. Now I want to delete it but it is not
working.
Do I need to do another 'set-cookie' in the HTTP header? I tried
(code below setting expires to 0) and it didn't work.
c =
tryg.ol...@gmail.com wrote:
Hello -
I managed to get a cookie set. Now I want to delete it but it is not
working.
Why struggle with this manually? Isn't it better to learn a bit of
framework like Pylons and have it all done for you (e.g. in Pylons you
have response.delete_cookie method)?
c[mycook][expires] = 0
Set [expires] using the following format to any time less than
current (which causes the browser to delete the cookie).
Here's a function I use to return a cookie expiry timestamp, negative
values passed in result in cookie being deleted.
def cookie_expiry_date(numdays):
On Jan 8, 1:16 pm, Jose C houdinihoun...@gmail.com wrote:
c[mycook][expires] = 0
Set [expires] using the following format to any time less than
current (which causes the browser to delete the cookie).
Here's a function I use to return a cookie expiry timestamp, negative
values passed in
On Jan 8, 10:33 am, tryg.ol...@gmail.com wrote:
On Jan 8, 1:16 pm, Jose C houdinihoun...@gmail.com wrote:
c[mycook][expires] = 0
Set [expires] using the following format to any time less than
current (which causes the browser to delete the cookie).
Here's a function I use to return a
To kill the cookie, simply set a cookie with the same name (and path)
Actually you may not even need to specify the path. Just the name and
expires param should do the trick. Haven't played with cookies in a
while so try with and without the path.
--