0

So i am saving my Session user into a $localStorage however since my system is used in the marketing business my users wont be using their own private computer each time they need to access the application.

Because of this if a user choose not to log out before exiting the application i will have to remove the session value from the $localStorage

My question is how?

Marc Rasmussen
  • 19,771
  • 79
  • 203
  • 364
  • i don't know angular, but have you tried using $sessionStorage instead? – Jeff Feb 27 '15 at 00:28
  • http://stackoverflow.com/questions/2858057/javascript-function-on-web-page-close might be what you're looking for. You might be able to have something in ondestroy method in your application as well, but idk if ondestroy is called when the webpage is closed. – rich green Feb 27 '15 at 00:32

1 Answers1

3

localStorage save session for ever, but SessionStorage close session when browser is closed check it

marjes
  • 172
  • 15