jQuery unload event only for close window not for Link navigation

前端 未结 4 1809
清歌不尽
清歌不尽 2021-01-07 13:14

I am using this code for logging out user when closes the page, but the user will logout also when clicking on other links (same website):

  $( window ).unlo         


        
4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-07 13:38

    Links arent the only problem, what if user edits the url and resubmits or simply refreshes the page to see new content. Or as mentioned previously, if user has 2 or more windows opened, and he closes the one, does it log out the other window ?

提交回复
热议问题