0

I want to destroy session whenever the tab is closed.

I have set expiry time for session but it is not meeting my requirement. If I restart Apache then session is getting destroyed but I want code to destroy session on closing tab.

  • Tab close -> https://stackoverflow.com/questions/3888902/detect-browser-or-tab-closing. Session destroy on `ajax` call https://stackoverflow.com/questions/55766492/how-to-destroy-php-sessions-using-javascript-ajax. Try it ) – Sergey Ligus Mar 28 '23 at 08:27
  • 2
    I'm often working in multiple different tabs and would be _really_ annoyed if closing one tab would throw me out of all of the other tabs' sessions as well. Horrible User Experience. – Olaf Kock Mar 28 '23 at 09:13

0 Answers0