Home > front end >  Implement close tabs out of the functionality of the site
Implement close tabs out of the functionality of the site

Time:09-22

At present the design of the website is when close the browser window, will delete the cookies in the sessionID, thus opened the page need to log in again,
But when not to close the browser, shut a website only when the TAB (website is only one TAB, do not open a new page), will remain logged in, you can bypass the login before back to the page after the login,

To achieve function is when close the web page (TAB), you can log out state (such as deleting cookies, etc.), I now find there are two ideas: 1. Using sessionstorage, close tabs can remove the inside information, but I don't know how to use this to clear cookies, (2) directly to clear cookies, but I don't know how to capture the action "closing tag page" to trigger to clear cookies,

Hope someone can help me with, is not I find these two ideas can also, don't want method is too complex, thank you very much!
  • Related