0

Does java .invalidate(); destroy all sessions on a single user?

Imagine that a logout button has a session.invalidate(); code to invalidate the session. What will happens if i login on the same account with two different browser and i logout with just one? Will the session be invalidated for both browsers? What if i press on the "back" button from the browser i logged out. Will i be able to use the account in the browser where i did not clicked on logout or it will be disconnected from both browser?

Thanks in advance, Joe

  • Possible duplicate of [Difference between validate(), revalidate() and invalidate() in Swing GUI](https://stackoverflow.com/questions/9510125/difference-between-validate-revalidate-and-invalidate-in-swing-gui) – Bill F May 29 '17 at 15:21
  • The following code is used for logout Session().invalidate(); res.setMessage(messagesPropertyReader.getPropertyValue(SESSION_CLOSED)); – Joe Dings May 29 '17 at 15:22
  • Sessions are not shared between two different browsers. A good reading for you is located here https://stackoverflow.com/a/19896997/4222181 – Stanislav Kvitash May 29 '17 at 15:34
  • Thanks for your reply. What about the back button then? – Joe Dings May 29 '17 at 15:38
  • @JoeDings since the session ist destroyed in Server side, back button shouldn't work – SilverNak May 29 '17 at 15:54

0 Answers0