jonas at sicking.cc
Fri Jul 25 04:58:23 PDT 2008
I was looking at the state management spec in the HTML5 draft. It looks
pretty small and confined and might be implementable in the firefox 3.1
time frame so I had some questions in the hope that we can solidify it.
What is the purpose of the 'title' argument? Is the idea that the UA
will show that where it usually shows the <title> of the page? If so the
title isn't purely advisory as it should probably affect document.title
as well. This would seem like a good idea to me.
What is the purpose of the url attribute? Why would you want to reload a
separate page when returning to a given state, then what was used to
load that state initially?
I would like to store the session states created using pushState on disk
so that the state can be restored in the event of a crash or a restart.
The only thing that would be needed to support this is that the 'data'
object is a string rather than a generic object. This is because a
generic object can't be serialized and saved to disk. Actually, what
would be even better is if the API accepted a string or a JSON-ifyable
All in all I would recommend the following changes to the API:
* Drop the url argument.
* Make title set document.title (except if empty or not specified).
* Require that the data is JSON serializable.
More information about the whatwg