[whatwg] html5 state handling: overview and extensions

On Mon, 15 Jun 2009, Mike Wilson wrote:
>
>   A naive solution for this would be to add something similar to a
>   browser_context-scoped cookie.

There have been several requests for things along these lines; I'd 
recommend taking them up with the working group working on cookies.


> Invisible Document state for GET requests
>   There currently is no support for associating invisible state 
>   with a Document delivered with GET. This is also an area where 
>   web frameworks have worked around this problem, and typical 
>   workarounds are to use url-based (visible) state or to switch to
>   POST instead.

This is by design, as I understand it. It sounds like a feature request 
for the HTTP working group, though.

Going forward I would expect authors to use AJAX-like interaction models 
so that there is only one page, and the state is all scripted.


> Document state
>   There currently is no support for associating script state on the
>   Document level. Any state saved in DOM or script global object 
>   will be lost on a page reload.

You can use pushState() to add an entry if your state changes relative to 
the original state described in the resource.


>   Use cases would include single-page Ajax applications that want 
>   to store data independent of a certain history entry, but at the
>   same time not sharing it with other page loads (Documents) of the
>   same application in the history of the same browsing context 
>   (otherwise sessionStorage could be used).

That's not a use case, that's a description of what it enables. When would 
this ever happen?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Saturday, 11 July 2009 22:07:02 UTC