W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2010

Re: Clarification on joint session history

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 27 Jul 2010 22:07:18 +0000 (UTC)
To: Ben Lerner <t-benle@microsoft.com>
cc: "www-dom@w3.org" <www-dom@w3.org>
Message-ID: <Pine.LNX.4.64.1007272203000.7470@ps20323.dreamhostps.com>
On Tue, 1 Jun 2010, Ben Lerner wrote:
> 
> Apologies if this has been addressed elsewhere, or if this is the wrong 
> forum to ask this...  According to the spec,
> 
> The joint session history of a History object is the union of all the 
> session histories of all browsing contexts of all the fully active 
> Document objects that share the History object'stop-level browsing 
> context, with all the entries that are current entries in their 
> respective session histories removed except for the current entry of the 
> joint session history.
> 
> This was changed as part of bug 7858 
> (http://www.w3.org/Bugs/Public/show_bug.cgi?id=7858), but I'm not sure I 
> understand it fully.  Suppose I have a document D1 with two sibling 
> iframes, initially navigated to documents D2 and D3.  The joint session 
> history at this point should contain one entry, right?  But is it D1, D2 
> or D3?

As far as I can tell, it doesn't really matter. The "current entry of the 
joint session history" is just a convenient placeholder for all three.


> Section 6.5.2 defines the page load processing model for HTML files, and 
> says "After creating the Document object, but before any script 
> execution, certainly before the parser stops, the user agent must update 
> the session history with the new page."  It doesn't say anything about 
> the relative maturations of multiple parsers handling multiple 
> documents.  From experimentation with real browsers, it appears that the 
> history entry should be D1.  But I could reasonably finish parsing D1, 
> process the iframe attributes for the first time, running the navigation 
> algorithm up to step 12 ("... must continue these steps 
> asynchronously"), then finish parsing D1 and update its session history, 
> before resuming the navigation algorithm, parsing D2 and updating the 
> iframe's session history.  It seems I could even reasonably finish the 
> two iframes in either order.  This would lead to any of D1, D2 or D3 
> being the most recent entry in the session histories.

Indeed.


> Ok, next.  If I click a link inside D2 and navigate that iframe to a new 
> document D4, what should the joint session history now contain?  It 
> seems to me from browsing the web that it ought to be "whatever it was 
> before, plus D4", making it "D1, D4".  But a literal reading of the 
> joint-session-history definition above seems to contradict that: D1 is 
> the current entry of the top-level session history, but it's no longer 
> the current entry of the joint session history, so it must be removed 
> from the joint session history, making the joint session history be 
> merely "D4".  What am I missing?

It would be D2, D4.


> To push it one step further, click on a link in D3, and navigate it to 
> D5.  I'd expect the joint session history to be "D1, D4, D5", but again 
> a literal reading seems to indicate that it will now be simply "D5".

It would be D2, D3, D5.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 27 July 2010 22:07:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:05 GMT