Hi Jamie. Thanks. Good info. I knew something changed somewhere. This works like a charm in IE8..never saw the New Session option under file...me bad !!
Greetings. -----Original Message----- From: Jaime Bozza [mailto:jbo...@mindsites.com] Sent: 20 August 2009 09:49 PM To: Leon du Plessis; 'Floyd Resler' Cc: a...@dotcontent.net; firstname.lastname@example.org Subject: RE: [PHP] SESSION VARIABLES ACROSS DIFFERENT WINDOWS/TABS Leon, This is really just a function of the browser. When a session cookie is created, if the browser is setup for a single instance, that's the session cookie it'll use for *any* request to that domain. This functions differently depending on what browser you're using. For example: Firefox - All windows, tabs, etc, under the same profile will use the same session. If you create profiles, you can have different sessions. IE7, IE6 - All tabs or windows opened from clicks will share the same instance/session. Starting IE from the icon will open up a "new" instance/session. This worked great if you wanted to run two different sessions at the same site/domain. Just start IE up from the icon again and you'd have a new session. IE8 - IE8 model changed, so that all browser windows, tabs, etc., run under the same frame/session, much like Firefox. Clicking the IE icon again now just keeps the same frame and thus the same session. Originally, this sounded like a big problem, but IE8 introduced a new feature - File Menu -> New Session. This will open up a new window that will be a separate frame that will not use current session cookies. Here's just one of many links, but gives some helpful hints on the IE side: http://blogs.msdn.com/ie/archive/2009/05/06/session-cookies-sessionstorage-a nd-ie8.aspx And another: http://blogs.msdn.com/askie/archive/2009/05/08/session-management-within-int ernet-explorer-8-0.aspx One of the issues now is that if you close IE, your session does not disappear. In the past (IE7/IE6), your session would disappear if you closed a browser window that you opened yourself, but it *wouldn't* disappear if you closed a browser window that was opened by a click from Outlook or another program. This was a bit inconsistent. I won't argue whether or not their "fix" was the best way to go, but now it's at least consistent. Note - In Firefox, not even "Private Browsing" separates the session cookies. If you start Private Browsing (Firefox 3.5), log into a site, then start a new browser window from the icon (that isn't in Private Browsing mode), it shares the session cookies. (Before you ask, I just checked this to be sure.) IE8 "InPrivate Mode" is a totally separate session, cookies and all. This could possibly be another way for you to run multiple sessions against the same domain. OTOH, multiple InPrivate sessions running at the same time share the same frame, so they share the same session, so it would only be good for a single new session. If you need more, just use File - New Session. Jaime > -----Original Message----- > From: Leon du Plessis [mailto:l...@dsgnit.com] > Sent: Thursday, August 20, 2009 8:16 AM > To: 'Floyd Resler' > Cc: a...@dotcontent.net; email@example.com > Subject: [PHP] SESSION VARIABLES ACROSS DIFFERENT WINDOWS/TABS > > It is just strange that I have this "condition" now...maybe I missed it > a > year ago ? > > >> "Having a different session start up for each window for tab would > be a > major pain." > > Why? > > People must please try and understand what I mean by NEW. It does not > apply > to windows/tabs being opened from a link or request. > > Imho, keeping the session per domain "sounds" wrong, it does not mean > it is. > It would have been nice if: > > Browser/tab one -> my login detail container A. > Browser/tab two -> my admin login container B. > (tabs/windows opened from browser one, then inherits container A > naturally) > (Closing browser one, then destroys container A then naturally only) > > NOT > > Domain.com -> one session container only. > > Heck, I am surprised it works that way at all cause it "sounds" like > the > domain can then only handle one user a time if arrays are not used or > profiles not created on FF no matter where the request come from, but, > then > I am obviously missing something in this respect as stated. When I have > time > I will reconstruct this concept again. > > Thanks anyway guys. I received some helpful advise for future > reference. > > But please..I do not, like many others, want to start a war. I am ok > with > things how they are. We can put this thing to rest. > > -----Original Message----- > From: Floyd Resler [mailto:fres...@adex-intl.com] > Sent: 20 August 2009 02:25 PM > To: Leon du Plessis > Cc: a...@dotcontent.net; firstname.lastname@example.org > Subject: Re: [PHP] SESSIONS lost sometimes > > Leon, > Sessions are used on a per-domain basis. So, no matter how many > windows or tabs you have open for mydomain.com it will be the same > session for all. Having a different session start up for each window > or tab would be a major pain. If you needed to keep track of a user > ID, for example, you wouldn't be able to. As already mentioned you > can use different browsers. You can also set up sub-domains which > would each have their own sessions. > > Take care, > Floyd > > On Aug 20, 2009, at 4:26 AM, Leon du Plessis wrote: > > > ">> It's not an issue, it's a feature." > > > > Thanks Arno...but it is a pain also. > > If I work with user A in Tab1 (window1), I want to work with user B > > separately in Tab2. When user in Tab2 logs off, I still want user A > > to work, > > and not suddenly have to re-login. Same with bank. If I work with my > > company > > account, then my personal account must not become an issue because I > > am on > > the same machine and site. > > > > I have no issue with using FF and IE to do testing as that takes > > care of > > browser compatibility testing at the same time :-), but I think when > > you > > start a new session with new values, it should be kept under that > > window/tab > > alone. Cookies can take care of more details, but my opinion is data > > should > > never be affected across windows/tabs unless the same user is logged > > in on > > both....even then I would expect PHP to keep data per session. Maybe > > it goes > > beyond being an IE or FF issue..the questiojn is...will PHP allow > > variables > > from session A become corrupted when session B is in progress when > > they > > should actually be handled seperately? > > > > In the end I think it is something I do wrong in PHP with the SESSION > > variables and how I clear them....if so...I don't think PHP should > > allow > > clearing SESSION variables from other sessions. > > > > -----Original Message----- > > From: Arno Kuhl [mailto:ak...@telkomsa.net] > > Sent: 20 August 2009 10:03 AM > > To: 'Leon du Plessis'; email@example.com > > Subject: RE: [PHP] SESSIONS lost sometimes > > > > -----Original Message----- > > From: Leon du Plessis [mailto:l...@dsgnit.com] > > Sent: 20 August 2009 09:44 AM > > To: firstname.lastname@example.org > > Subject: RE: [PHP] SESSIONS lost sometimes > > > > Since we are on the subject: I have the following similar problem: > > > > When testing page on internet explorer, I find that one tab's > > variables can > > affect another tab's variables. Thus when having the same web-site > > open and > > using SESSION variables but for different users, Internet explorer > can > > become "disorientated". This also "sometimes" happen when I have two > > separate browsing windows open with Internet Explorer for the same > > site. > > > > I have yet to determine if this is an internet explorer, or PHP or > > combination of the two that is causing this condition. > > > > To my understanding _SESSION variables should be maintained per > > session, tab > > or window. If this has been addressed already, my apologies, but > > thought it > > worthwhile to mention. > > > > If someone perhaps have a solution or can confirm this as a known > > issue and > > maybe is the same or related to Angelo's problem? > > > > -------------------- > > > > If different browser windows/tabs on the same client-side computer > > didn't > > share session info then you'd get the effect of being able to log > > onto a > > site with one browser window, but find in a second browser window > > that you > > were not yet logged on. Experience will tell you that you're logged > > on in > > both browser windows (try it with your online bank). It's not an > > issue, it's > > a feature. If you want to be able to use different browser windows > > as though > > they were different users then use different browsers e.g. IE and FF > > on the > > same client-side computer will look like two separate end users to > the > > server, and they don't share session info or cookies. > > > > Cheers > > Arno > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php