문제

I've simple SPA and I make log out on reloading. As I understand the disadvantage of NOT logging out on reloading is to reinitialization of the whole application.

Questions:

  1. What are the disadvantages of NOT logging off at Single Page Application?
  2. What is the best way to achive NOT loging of on reloading (F5)?
도움이 되었습니까?

해결책

  1. The advantage is that not logging off will avoid pissing off your users so much that they'll want to kill you :-). Seriously, if an application logged me off every time I refresh a page (or open a link in a new tab), I would never use that application again.

  2. Well, don't do it. Make sure the authentication token is stored in a place surviving a refresh, i.e. not in some JS variable, but in a cookie or local storage, for example.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top