[Catalyst] Browser window/tab independent sessions

Perrin Harkins perrin at elem.com
Fri Jan 5 21:26:02 GMT 2007


On Fri, 2007-01-05 at 20:44 +0000, Ian Docherty wrote:
> Does anyone try to keep different state information in different browser 
> windows/tabs?

Back in the old days, when we used to make websites with our stone
knives and bear skins, we used to keep state information in hidden form
fields and query strings.  These techniques have none of the "global
state" problems that cookies do.

Putting things that are specific to a window/tab in a cookie-based
session is a pet peeve of mine actually, since it can break things so
spectacularly.  If you check, you'll see that all of the major web sites
like Yahoo and Amazon are careful to avoid this kind of issue (multiple
tabs don't interfere with each other) and they generally seem to use the
old-school techniques.

> 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?

Users are not going to like that.  You'll never be able to get something
like this working without becoming totally dependent on JavaScript to
manipulate your URLs and tell you when new windows are opening.  At that
point, the hidden form fields will look really easy by comparison.

- Perrin




More information about the Catalyst mailing list