Clearing SESSION variables when a tab is closed

前端 未结 3 621
甜味超标
甜味超标 2021-01-20 03:39

I need to clear the session variables when the tab is closed but I could not find any solutions so far. The closest I have got is by using the \"onbeforeunload\" function is

3条回答
  •  日久生厌
    2021-01-20 04:23

    Unfortunately, there is no way to prevent page refresh (caused by form submit or any other navigation) from calling "onbeforeunload".

提交回复
热议问题