Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Firefox (3.6.18) shares session when application is opened in multiple tabs. I want to prevent this, on every opened tab there should be a new session so that data state in the session should not be corrupted.

Any help in this regard will highly be appreciated.

share|improve this question

migrated from Jul 29 '11 at 13:03

This question came from our site for professional and enthusiast programmers.

Any information on the Web framework in use? One solution might be not to allow cookies and always transfer the sessionid or a token to FF and back to the server. – Thomas Jul 28 '11 at 9:45

There is no issue with Firefox or even with that version you've mentioned. I would consider that your understanding of how browsers track session cookies is a bit incomplete. Browsers will always send a request to a server, with the cookies for the server domain that issued them. This is irrespective of the browser tab that issued the cookie.

If you do not want session cookies to be used across tabs, you can have page specific identifiers to distinguish every page rendered by the server to a client. When the corresponding tab sends a request back, it must send the page-specific identifier as well, so that the server may distinguish requests issued across tabs. This wouldn't help you, if a user copies a link with this page-specific identifier from one tab to another.

If you want to proceed with using page-specific identifiers, then all you have to do is to parse the incoming request parameters for the page-identifier. If none exists, then you can generate one using a PRNG, and send a response containing this page identifier in the page (for example, as a hidden field in a form, or in the URL, but never as a cookie).

Note: If you are looking for browser specific features, Firefox 3 and 4 do not have the "New Session" feature present in IE9 that would allow users to create new sessions across browser windows. Also, the "New Session" feature of IE9 does not appear to work, if the server uses persistent cookies to track the user.

share|improve this answer

You can't,

You can rewrite URL and append jSessionId with each URL and track it by hand. but its not the way to do the things

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.