views:

69

answers:

4

If I log in to a website with the same user name and password in different browsers then close one of the windows, will the session still exist?

A: 

The session is local to the browser. Two browsers = two sessions. That is, unless you have some javascript (window.close) forcing the logout.

Andrew Sledge
+1  A: 

The Session in the still opened Browser will still exist, yes (Exept the website has a mechanism to avoid double sessions, or kills all sessions form a User at once)

Tokk
Ok thank you very much
ever thought about accepting some answers on your questions? ;-)
Tokk
A: 
  • Browser 1 starts session 1, when closing browser 1 this will close session 1
  • Browser 2 starts session 2, when closing browser 2 this will close session 2

Browser 1 can not end session 2, nor can browser 2 end session 1

Phill Pafford
A: 

I just want to concreticise preceeding answers. The browsers don't have any kind of connections between them - they are standalone applications. If browser starts a seesion, it belongs to it until it is unset e.g. B1 => Sess 1 B2 => Sess 2 And neither of them is accessible somewhere else than it the browser that created it. More information about PHP sessions can be found here http://www.php.net/manual/en/intro.session.php. You can find there "A visitor accessing your web site is assigned a unique id, the so-called session id. This is either stored in a cookie on the user side or is propagated in the URL." and that is the answer to your question :-D

Bery