Re: ACTION-61: text for embedding part of the Window object

Ian Hickson wrote:
> 
> I've changed the spec so that if you navigate a top-level browsing context 
> whose name has been set using window.name (which is the only way to set a 
> name on a top-level browsing context as far as I can tell) to a new 
> origin, then the name is reset.
> 

Even better would be if the name was restored if navigating back to that
origin (f ex through history.back but also by a "new" navigation).

A use case often forgotten is using the window name for "browser window
based" sessions. 

Due to the fact that window.name is the only window data value that persists
between page loads, it may be used to uniquely identify a specific browser
window throughout its navigation (in contrast to cookies, that identify a
browser *process*, or hidden form tokens that rely on the token being passed
in and out on every page load).

When using this session technique the window name is often assigned its
unique value at first encounter of the site. When navigating the window to
another origin the name is reset (which is perfect as we are then protecting
the old site from getting its window name hijacked from the new site). If
then navigating back to the old site, as stated in the current spec, it
seems window name is once again reset which makes us act as if "first
encounter" again and we create a new unique value ("session id") and lose
the previous one.

Either way, this is probably not a big problem but I thought I would add one
more use case to consider from a webapp programming POV :-).

A related note about IE: assigning window.name through script is only
possible if the window was not initially created with a name. Thus, a window
created without a name (f ex target="_blank") may have its name changed as
many times as you like, but a window given a name at creation (f ex
target="mywin") will never be allowed to have it changed (or may appear to
allow the change but later reset to the old name).

Best regards
Mike Wilson
-- 
View this message in context: http://www.nabble.com/Re%3A-ACTION-61%3A-text-for-embedding-part-of-the-Window-object-tf3814083.html#a10969486
Sent from the w3.org - public-webapi mailing list archive at Nabble.com.

Received on Tuesday, 5 June 2007 13:30:24 UTC