Advertisement
This question is not specific to .net, but I imagine that it's something that a .net developer might run into...
I'm developing a web app that uses the HttpSession to store session info. I want the user to be able to have multiple browser windows open. Each browser window shares the same HttpSession. However, the user experience should be that each browser window has its own independet application state, which does not get affected by the other windows. So I added a hidden form field to the HTML called "conversationId", the intention being that each browser window would have a different conversationId. When the user opens a new window, the app notices that there is no conversationId request parameter, and initializes conversationId to a new unique value. The conversationId is then used as a level of indirection to data inside the HttpSession. (In order to maintain the conversationId hidden variable, the web app only uses PUT requests.)
This all work perfectly in Firefox. But it doesn't work with IE6 or IE7.
Here's the difference... With Firefox, if the user opens a new browser window (using control-N or File/New), the window comes up blank. The user can then access the app via a bookmark. The app detects that there is no hidden conversationId variable, and creates a new uniqeu conversationId. Voila, everything works great.
But on IE, when the user opens a new window (using control-N or File/New), IE clones the existing window. Both the URL and the HTML (including the hidden conversationId form field) are cloned too. So the new window has a conversationId that is identical to the previous window.
We've already considered and rejected the idea of adding a "new window" button.
I imagine that other apps must have encountered this issue. Is there a solution?
I'm developing a web app that uses the HttpSession to store session info. I want the user to be able to have multiple browser windows open. Each browser window shares the same HttpSession. However, the user experience should be that each browser window has its own independet application state, which does not get affected by the other windows. So I added a hidden form field to the HTML called "conversationId", the intention being that each browser window would have a different conversationId. When the user opens a new window, the app notices that there is no conversationId request parameter, and initializes conversationId to a new unique value. The conversationId is then used as a level of indirection to data inside the HttpSession. (In order to maintain the conversationId hidden variable, the web app only uses PUT requests.)
This all work perfectly in Firefox. But it doesn't work with IE6 or IE7.
Here's the difference... With Firefox, if the user opens a new browser window (using control-N or File/New), the window comes up blank. The user can then access the app via a bookmark. The app detects that there is no hidden conversationId variable, and creates a new uniqeu conversationId. Voila, everything works great.
But on IE, when the user opens a new window (using control-N or File/New), IE clones the existing window. Both the URL and the HTML (including the hidden conversationId form field) are cloned too. So the new window has a conversationId that is identical to the previous window.
We've already considered and rejected the idea of adding a "new window" button.
I imagine that other apps must have encountered this issue. Is there a solution?
Advertisement
Advertisement
-
Re: how can a web app support multiple open browser windows in IE
Sat, June 16, 2007 - 4:17 PMWhat exactly is wrong with adding a "new window" button? That seems like the most obvious and easy solution. You can't control what the browser is going to do with it's own built-in buttons. And if you built it for one set of behavior, that behavior might change with the next version of the browser. Your best bet, if you want your app to do what you want it to do, is to build the functionality yourself. -
-
Re: how can a web app support multiple open browser windows in IE
Sat, June 16, 2007 - 8:51 PMIf there is absolutely no way to code around this, then we may do that.
The problem with adding a "new window" button to the app is that the user might not see it and then use Control-N to open a new window, so it would be nice if that worked. -
-
Re: how can a web app support multiple open browser windows in IE
Sun, June 17, 2007 - 2:28 AMI dont think this can be programmatically controlled by the page and I have to agree that I think its best not to rely on this behavior from Firefox (there are even extensions to firefox which mimic IE's behavior since for many apps its quite desireable to have the shared session state.) Even IE can be set to use seperate sessions I believe (this is controlled by Open as Seperate Process setting) so it will not be consistent for you. I wish I had the solution for you but I think trying to force IE not to do this is not like to work out. -
-
Re: how can a web app support multiple open browser windows in IE
Sun, June 17, 2007 - 2:31 AMActually this might work for you - server sends a unique sequence id on postback used to index into the session state. Requires server side implementation and a bit of work but sounds plausible (I am not a web dev so I cannot vouch for this, I just found it online)
graciesdad.wordpress.com/2007/...state/ -
-
Re: how can a web app support multiple open browser windows in IE
Sun, June 17, 2007 - 10:27 PMThanks! That solution looks promising.
-
-
-
-