Cookie not deleted when you close your browser?
Scenario:
For example: Anonymous User enters my site xyz.com , I need to show the Hello hello popup . If the user opens a new tab without closing the browser and enters xyz.com , then we shouldn't show the popup again. If the user closes the browser and returns to xyz.com , then we should show "Hello, hello" .
Note:
No server side. Client solution required.
What I have tried:
I have tried cookie without expiration
document.cookie = "welcome=true";
But the cookie is not deleted when the browser is closed.
No, luck with onbeforeunload and unload As the event is fired on page refresh
Any idea or suggestion would be grateful for solving this problem.
+3
source to share
No one has answered this question yet
See similar questions:
or similar: