views:

205

answers:

3

I found that IE7 maintains same session for multiple tabs in a single browser window and thus doesn't support different sessions for different tabs in a single browser window. My client needs that the application should work perfectly in two different tabs in a single browser window. i think this is because of session and cookie problem. Is there a workaround for this.

Appreciate your help in this regard.

Thanks, Manoja Swaro

+1  A: 

Browser tabs share cookies (and not just in IE, in Firefox and the others as well), and the cookies contain the session ID.

You could switch to cookie-less sessions however this has security and usability concerns. URL based sessions are easily hijacked, and it breaks bookmarking as well, as each page has a unique URL per session.

blowdart
A: 

IE7 doesn't maintain a 'session' as such, you're talking about a cookie with a session ID in it, I would guess. All browsers will have one value for a cookie, it doesn't vary by window/tab.

If you want a session ID to travel with the click trail, you're going to have to pass it from page to page, by (for instance) passing it as a URL parameter and ensuring that you add the parameter to the URL within the page. (Or do without a session.)

ijw
A: 

The real solution is to change your application so it doesn't assume each session has only one page. An application that can't be open in multiple tabs is broken.

This can be hard if this assumption is already deeply embedded in your code.

orip