MozillaZine

Firefox uses same session for multiple windows tabs

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

Post Posted July 7th, 2008, 12:00 pm

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.

the-edmeister

User avatar
 
Posts: 32221
Joined: February 25th, 2003, 12:51 am
Location: Chicago, IL, USA

Post Posted July 7th, 2008, 12:52 pm

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.

Dartman
Moderator

User avatar
 
Posts: 11997
Joined: February 9th, 2006, 9:43 pm

Post Posted July 7th, 2008, 1:59 pm

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

Post Posted July 8th, 2008, 5:37 am

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
 

Post Posted July 16th, 2008, 1:57 pm

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...).

the-edmeister

User avatar
 
Posts: 32221
Joined: February 25th, 2003, 12:51 am
Location: Chicago, IL, USA

Post Posted July 16th, 2008, 7:04 pm

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
 

Post Posted August 19th, 2008, 9:27 am

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
 

Post Posted October 28th, 2008, 11:23 pm

Hi Cold-Gin,

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

susheel
Guest
 

Post Posted November 17th, 2008, 11:42 pm

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
 

Post Posted November 18th, 2008, 12:40 am

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

Return to Firefox Support


Who is online

Users browsing this forum: No registered users and 9 guests