- Django
class LogoutView():
def get(self, request):
del request.COOKIES['sessionid']
- JS
delCookie (name) {
document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/';
document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
}
delCookie ('sessionid')