New here and I wanna make a question related to J2EE. When a user logins into web system at the first time,It usually generates the sessionId created by server .Meanwhile,client cookie will also store current sessionId value.Okay,well.The question comes :When the user closes the browser ,will the server destroy the sessionId ?If yes,how can the server know when the browser closes? Because when we reopen the browser ,login information is required to fill in again,according to this phenomenon,could anybody else give me a clear explanation ?Thanks in advance.
Asked
Active
Viewed 219 times
0
-
The answer depends on the lifespan/length of the user session. Normally just closing the browser would not kill the session, unless your page could somehow tell the server that an event is happening. – Tim Biegeleisen Jun 27 '17 at 02:16
-
Thanks for your answer. Assume that user session is valid when the user reopens the browser,but why does the user need to fill in the login information again ? Really confused... – Lihang.Yu Jun 27 '17 at 02:30
-
FYI: "J2EE" has been renamed to "Java EE" more than 10 years ago. Please catch up and make absolutely sure that any book/tutorial you're reading doesn't at all use the word "J2EE", otherwise you'll be learning for nothing. – BalusC Jun 27 '17 at 09:27
-
@ BalusC: Thanks for your suggestion,I will follow it. – Lihang.Yu Jun 28 '17 at 02:20