Thanks.

On Feb 7, 9:28 am, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> http://msdn.microsoft.com/en-us/library/ms178195.aspx
>
> "You cannot directly delete a cookie on a user's computer. However,
> you can direct the user's browser to delete the cookie by setting the
> cookie's expiration date to a past date. The next time a user makes a
> request to a page within the domain or path that set the cookie, the
> browser will determine that the cookie has expired and remove it."
>
> On Feb 7, 1:28 am, Dane <dane.schnei...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hello,
>
> > I've got my own user system (not using Auth), and I'm trying to
> > implement a Remember Me option with cookies. It's working fine when
> > the user selects 'Yes' for remember me. Setting and detecting the
> > cookie is no problem, but I can't find a way to delete the cookie when
> > the user logs out or selects 'No'. Here's my code which attempts
> > everything I can think of.
>
> > if request.cookies.has_key('user'):
> >         request.cookies['user'].clear()
> >         del request.cookies['user']
> >         print 'remove request user cookie'
> > if response.cookies.has_key('user'):
> >         response.cookies['user'].clear()
> >         del response.cookies['user']
> >         print 'remove response user cookie'
>
> > After running this, request.cookies.has_key('user') is still returning
> > true and the cookie's data is still present.
>
> > Ideas? Thanks.

Reply via email to