[Catalyst] Browser window/tab independent sessions

Ian Docherty ian at iandocherty.com
Fri Jan 5 20:44:03 GMT 2007


Does anyone try to keep different state information in different browser 
windows/tabs?

For example, it makes sense to have a session variable that holds the 
currently logged in user. This will be available to any browser window 
that is open to the application.

But what if you wanted to keep some state information dependent on the 
browser window. So for example you could have multiple windows open, 
each one in a different state of (for example) setting up a money 
transfer. The user could move between different windows at will, 
completing one form or not etc. and setting state in one would not 
affect the others.

I think that I have in mind a RESTful application, but not exactly.

I find it very useful for example to hold search filter data in a 
session variable. Then when I come back to that form the search filters 
hold the previous search values. In a complex application there could be 
many of these variables.

Now in a multi-window browser it would probably be good to make each of 
these browser windows hold a different state for these search filters. 
The only idea I have is to hold the browser window session in the URI, e.g.

http://mydomain.com/window_session/XYZ/transaction/123/user/456/edit

where the /window_session/XYZ part would be a PathPart and would be 
different for each browser window.

How would I create these URI's for each window. I suppose I would have 
to have a 'create new window' button in the application that generated a 
new window with a unique window_session?

I can't be the first person to try this, what have other people done?

Regards
Ian Docherty (IcyDee)




More information about the Catalyst mailing list