[whatwg] Proposed changes to the History API

Justin Lebar justin.lebar at gmail.com
Fri Aug 21 09:46:20 PDT 2009


> Sorry, it seems we are not talking about the same application.
> Jonas referred to attachment pages in your bug database, which
> I assumed would f ex be a page like this one:
> https://bugzilla.mozilla.org/attachment.cgi?id=386244&action=edit
> (The textarea in this app is not created onload, it is delivered
> in the server-generated HTML and thus is subject to form field
> value persistence.)

STR:
  * Open https://bugzilla.mozilla.org/attachment.cgi?id=386244&action=edit
  * Click "Edit as comment"
  * Change the text in the textarea
  * Close and re-open your browser

Actual behavior: The textarea is back to its original state, read-only
and without your edits.  Even after you press "edit as comment", the
state still doesn't reflect the changes you made before you closed the
browser.

Behavior with History API: When you click "edit as comment" and as you
type your comments, the page periodically saves the data to pageState.
 When the page receives a popstate, it restores the state of the
textarea.

I imagine that one could rework the Bugzilla page to function better
on browser restart using existing web technologies.  But as the page
is designed right now, some kind of pageStorage would be helpful.

-Justin



More information about the whatwg mailing list