[whatwg] Proposed changes to the History API

Justin Lebar justin.lebar at gmail.com
Thu Aug 20 17:15:36 PDT 2009


> Overall, I think preserving history API information when restoring sessions
> is a good thing.  My only concern is whether web developers will program in
> such a way that this works.  Unless ALL state will need to be either saved
> in the history API or reconstructible from that information, bad things will
> happen.  (Note that this was difficult if not impossible with the original
> API, but your new proposal makes this quite practical.)

Maybe the right solution is to have a pageStorage object, which works
just like sessionStorage but is local to a session history entry and
perhaps carries some weak promise of persistence.  It might be a
little confusing that in the following code

  var len1 = pageStorage.length
  history.pushState(...)
  var len2 = pageStorage.length

len1 != len2, but that doesn't seem too complicated.

> Do most web apps that use iframe hacks (for tracking history) come back
> cleanly from a session restore?

I don't know, but I presume it would be possible so long as form data
is saved across session restore.

-Justin



More information about the whatwg mailing list