0

I want need a way to identify the when a user is closing a tab or closing a browser.

The behavior I am expecting for user is to end his session only on browser close and not on tab close.

I have tried following the below stackoverflow trail:-

detect-browser-or-tab-closing--stackoverflow

But all the solution pinning towards restricting browser reload.

Any strategic and technical help would be apreciated.

blazehub
  • 1,880
  • 19
  • 25
  • This already has an answer here : https://stackoverflow.com/a/4985724/4244684 – Stender Aug 15 '18 at 12:22
  • Possible duplicate of [How do I remove cookies when the browser is closed?](https://stackoverflow.com/questions/4985693/how-do-i-remove-cookies-when-the-browser-is-closed) – Stender Aug 15 '18 at 12:23
  • 1
    basically If you don't set an expiry date it defaults to expire at the end of the session . - Sessions only end, when browser is closed - not on tab close – Stender Aug 15 '18 at 12:23
  • session cookie will solve the problem...but is their any side effect to pushing cookie strategy in production? – blazehub Aug 15 '18 at 17:13

0 Answers0