Forum Moderators: coopster

Message Too Old, No Replies

Definition of a User Session for PHP Sessions

         

scorpion

10:45 pm on Dec 7, 2002 (gmt 0)

10+ Year Member



Anybody know how the definition of a standard session? For example what if the user opens a new browser window or clicks the IE icon on the start menu, is that the same session?

andreasfriedrich

10:54 pm on Dec 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As long as the new window belongs to the same process then it is the same session. When you start a new browser process by clicking the IE icon on the start menu you will get a new session.

Andreas

Dreamquick

11:49 pm on Dec 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm going to agree with andreas, I like to think of it like this;

If it is just another window spawned from an original window then they are the same application, it stands to reason they can share memory space, if they can share memory space there's no reason why they can't share session cookies too...

However, to my knowledge the behaviour of session cookies isn't covered by an RFC so it's very much an informal off-shoot of permenent cookie RFCs.

This essentially means that there is nothing to say that a session cookie *has* to be carried over to a new window, or shared between multiple windows. That said that would appear to be how everyone has implemented it at the moment and so it is very unlikely anyone will ever change this for fear of breaking older applications.

- Tony