1

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.

1
  • 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, 2011 at 9:45

2 Answers 2

5

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.

2

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

You must log in to answer this question.