[Welcome] [TitleIndex] [WordIndex


A cookie that the user is presenting is no longer valid; you wish to delete it.


Use the expire_cookie() method of the HTTPResponse object.

     get_response().expire_cookie('login_time', path='/')

This causes the cookie's expiration date to be set to a date in the past, causing the cookie to be deleted.


See CookieSecurity for a discussion of security considerations related to cookies.

Strictly speaking the 'path' argument is optional, but some clients will only delete the cookie if the path argument's value matches the one provided when the cookie is created. Therefore you should always specify it.


2010-09-22 22:14