cookie, "" .
Let's say the browser stores a cookie that expires tomorrow. When you change the cookie expiration date to yesterday, the browser sniffs it and says, “This has expired, I'm going to toss it”, effectively deleting the cookie (there really is no other way to delete the cookie).
If you do not set an expiration time when the cookie is created and you do not edit this property, the cookie automatically becomes a session cookie, as a result of which the cookie is deleted when the user closes the browser.
source
share