⭐ in reply to How can I delete a cookie?
See How can I maintain a session cookie for more information.
If you don't set an expiration date on a cookie that you've created, it will be deleted when the browser is closed.
If the user wants to delete a cookie created in a previous session, you can set the expiration date of the cookie in the past (or possibly set it to "", I haven't tried this).
If you'd like to learn more, you can read Netscape's Preliminary Specification for cookies.
In Section
Seekers of Perl Wisdom