W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2008

[whatwg] pushState

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 29 Jul 2008 10:48:20 -0700
Message-ID: <488F57E4.9070508@sicking.cc>
Ian Hickson wrote:
> On Fri, 25 Jul 2008, Jonas Sicking wrote:
>> So what I think we should do is to enforce that 'data' is a JSON
>> serializable object.
> (We need a better term -- and definition -- for this.)

I'll check with the ECMA Script folks, but this one might be an
alternative to link to:


State that the object passed as 'data' is passed to JSON.parse with the
second argument not specified. Any exception thrown is forwarded out to
the caller of pushState as usual.

>> When entering a SH state for which a Document has been destroyed, we 
>> load the URL associated with that SH entry. After the 'load' event for 
>> the Document has fired, and if a data object was provided in the 
>> pushState call for the SH entry, we fire a PopStateEvent event 
>> containing the data stored for the object.
> How would this work with bookmarking?

Just as specified (or at least intended) in the spec right now.

Say that the user starts on page1.html

<bookmark>   (bookmarks page1.html)
pushState("title", "data")
<bookmark>   (bookmarks page1.html)
pushState("title", "data", "page2.html")
<bookmark>   (bookmarks page2.html)

Additionally, a UA is free to add the ability to store the data 
parameter in its bookmark storage. For example firefox under some 
circumstances flags URIs in the bookmark store as POST URIs, i.e. they 
should be fetched with POST rather than GET (this is specifically for 
search engine bookmarks). Similarly the data can be stored alongside the 
URI for the bookmark, however this is optional, just like the fastback 

/ Jonas
Received on Tuesday, 29 July 2008 10:48:20 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:03 UTC