[whatwg] Proposed changes to the History API
Mike Wilson
mikewse at hotmail.com
Fri Aug 21 13:39:01 PDT 2009
Ah good, something made me think you were trying to populate
"fresh" history entries as well, which would have been
awkward.
We've been discussing general properties of the solution for
a while now. It would be interesting to see a concrete
example on how you intend the dynamics of your solution to
work. It would be great if you could outline the different
events and method calls used (in order) to save and restore
the history state object in the following situations:
- doing a "fresh" navigation from page#1 to page#2
- going back in history from page#2 to page#1
If we start with this simple example (simple hash nav and
no URL "impersonation") then maybe we can move on to more
advanced stuff later on. I'm assuming page#1 and page#2 are
perceived by the user as different parts of the application
and that he wants state saved for each of them when
navigating back and forth in history.
Best regards
Mike
Justin Lebar wrote:
> Mike Wilson wrote:
> > What you're essentially saying here is that when restarting
> > the browser, you will also restore history data, correct?
> >
> > For tabs that were open when the browser was closed, this
> > will mean that these will reappear after restart with full
> > history, being able to go Back and restore state on
> > previous pages?
>
> Right. We already do this, sans popping a state object.
>
> > But for pages that were explicitly closed, and then
> > navigated to in a "new" tab, will you restore the full
> > history in these as well?
>
> No. The state object is attached to the session history entry, not to
> the page's URI. If you close a tab, all its session history entries
> go away. If you navigate to a page which was open in the tab you just
> closed, that new instance of the page won't be aware of the old page's
> state object(s).
>
> > And if there has been several sessions in parallel on that
> > URL space, which one do you respawn for a navigation to a
> > related page in a new tab?
>
> A navigation on a new tab would get an entirely new environment.
> Otherwise, like you suggested, this would be very confusing.
More information about the whatwg
mailing list