Firefox uses same session for multiple windows tabs

User Help for Mozilla Firefox
Post Reply
Cold-Gin
Posts: 3
Joined: July 17th, 2007, 10:57 am

Firefox uses same session for multiple windows tabs

Post by Cold-Gin »

I have a web based order maintenance application that updates an order and then automatically displays the next order in the order queue after the DB update has taken place. Here is a big problem that I am seeing:

- I open two separate FF browser windows, which display the same exact order *before* clicking update. (Let's say order #110)
- I click update in one of the windows, and the next order (#111) is displayed. At this point, session data (a java bean) has
been updated with the *new* order number (#111)
- If I now go to the SECOND FF browser window which is displaying the original order (#110), and I click update, the *NEW*
order (#111) gets updated with order #110's data!

This obviously creates some major turmoil. I asked another developer to test this behavior on a completely separate app, and he received the same type of unwanted session sharing behavior.

I tested this same scenario with two IE 6 browser windows, and there are no problems, because I get a unique session ID for each window. There is no sharing of the session data between browser instances.

Thanks.
User avatar
the-edmeister
Posts: 32249
Joined: February 25th, 2003, 12:51 am
Location: Chicago, IL, USA

Re: Firefox uses same session for multiple windows tabs

Post by the-edmeister »

I tested this same scenario with two IE 6 browser windows, ... There is no sharing of the session data between browser instances.

IE uses a separate executable for each separate window, where Firefox uses the same firefox.exe instance for all open windows.

You can achieve separate "instances" by launching a 2nd Profile.
http://kb.mozillazine.org/Opening_a_new ... er_profile
http://kb.mozillazine.org/Profile_Manager
A mind is a terrible thing to waste. Mine has wandered off and I'm out looking for it.
User avatar
Dartman
Moderator
Posts: 11995
Joined: February 9th, 2006, 9:43 pm

Re: Firefox uses same session for multiple windows tabs

Post by Dartman »

Moving to Firefox Support
Alcohol and Calculus don't mix. Never drink and derive.
Cold-Gin
Posts: 3
Joined: July 17th, 2007, 10:57 am

Re: Firefox uses same session for multiple windows tabs

Post by Cold-Gin »

Thanks for replying.

I am not really looking to "achieve separate instances by launching a 2nd Profile." The point that I am raising here is that this seems like unreasonable and disastrous behavior *on the part of the browser*. If you create a web application and expose it to the public, you can be guaranteed that many users will have multiple windows open. If they happen to have your page open in two instances of FF, then all bets are off for your application because of FF's singular session model.

Does it make any sense that it should be the web application's responsibility to check the session ID? The web app would have to store and maintain multiple session states (NOT).

I also checked my cookies in both windows, and both windows are storing the same session ID.
ams4rice
Guest

Re: Firefox uses same session for multiple windows tabs

Post by ams4rice »

yes this behaviour annoys me a lot and is usually the only reason I revert to IE6 once in a while: when I want to login the same website twice with different user id's (different privileges), I first have to LOGOUT the current session in ff before I'm able to login with another user id...

I folly agree with you Cold-Gin: less experienced users assume they will be 'safely' logged out any site by closing the current window they see and are not aware that they left some ff window minimised on the taskbar behind in the internet cafe! It makes me mad firefox does not help protect these users (I'll never leave the internet cafe without physically logging out on the accessed site+closing all ff windows; if possible check for remaining running processes and clear caches... if at all possible at the average internet cafe pc on my foreign holidays...).
User avatar
the-edmeister
Posts: 32249
Joined: February 25th, 2003, 12:51 am
Location: Chicago, IL, USA

Re: Firefox uses same session for multiple windows tabs

Post by the-edmeister »

Guys, MozillaZine is users helping other users, we are not the Firefox developers. We can't change the basic code or the way Firefox works, all we can do is offer suggestions about how to get around certain limits present in Firefox - it is the way it is.

If you don't think Firefox handles sessions or cookies properly contact Mozilla at their "feedback" site.
http://hendrix.mozilla.org/


Ed
A mind is a terrible thing to waste. Mine has wandered off and I'm out looking for it.
sbockelman
Guest

Re: Firefox uses same session for multiple windows tabs

Post by sbockelman »

It might be better/safer to post the order ID with the data rather than assuming the browser and server are in sync; your app could also break if the user navigates back to the order after the session bean is updated.
chenna
Guest

Re: Firefox uses same session for multiple windows tabs

Post by chenna »

Hi Cold-Gin,

I am also facing the same issue.
Please let me know if you resolved this issue.
thanks..
Chenna
susheel
Guest

Re: Firefox uses same session for multiple windows tabs

Post by susheel »

Anonymous wrote:Hi Cold-Gin,

I am also facing the same issue.
Please let me know if you resolved this issue.
thanks..
Chenna
Hi Cold-Gin,

I am facing a problem that if i do navigate my application using Mozilla firefox and after that i comeback by using browser back button and again go in by using browser forward button and then i navigate another page that i havn't navigate before still i am able to navigate the whole application without getting any login page again. Please let me know about any possible solution for that.
emwd
Guest

Re: Firefox uses same session for multiple windows tabs

Post by emwd »

There was an extension that let you do separate Firefox sessions without using separate profiles. Cookiepie http://www.nektra.com/oss/firefox/extensions/cookiepie/ I don't know if it works with current versions.

Another possibility is to use on-the-spot generated (and destroyed) temporary firefox profiles. The easiest way to do this is to make many copies of Firefox portable in different folders, say 1 2 3 4 etc on the desktop.
http://portableapps.com/apps/internet/firefox_portable
Post Reply