Does it matter if several browser windows are treated as belonging to the same session? Yeah, I suppose it can.

Problem is, WWW has a very dim view on what a window is. Sometimes it can have a kind of id (with javascript):

<A HREF="/public/Details/2451819_1.html" TARGET = "_new" onClick="wind +ow.open('/public/Details/2451819_1.html','600175392813981','height=17 +5,width=300,scrollbars=1,alwaysRaised=1,resizable=1');return false">
But if the user clones a window I suppose this id will be duplicated?

When the application through the user's action changes state, the application should check that this state change is possible.

Part of the information for that might come from the session object, where there could e.g. be a different sort order preference for different windows.

One solution could be to give new
hidden field/cookie/mangled path
for each new action the user takes, or state he puts the application in. Yeah, that's probably the way to go:

Make changes to the session object to reflect new state and bind the updated object (and hence the state) to a new session id.
Wreaks havoc with the "back" button though.

But what happens to old rogue windows with old rogue session objects, could they nullify state changes if the user makes actions from them? I suppose this depends on the state change handling on the server side. If one is careful to code what data affects the user interface only and what parts actually do transactions that may be enough.

/jeorgen


In reply to Re: practical aspects of sessions and state by jeorgen
in thread practical aspects of sessions and state by d_i_r_t_y

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.