79698238

Date: 2025-07-11 11:10:56
Score: 0.5
Natty:
Report link

To delete a session cookie with JavaScript, set it with an expired date:

document.cookie = "yourCookieName=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";

This works even for session cookies — it tells the browser to remove it immediately.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Sagar Vaghela