[whatwg] Proposed changes to the History API

Jeremy Orlow jorlow at chromium.org
Fri Aug 21 12:39:08 PDT 2009


On Fri, Aug 21, 2009 at 12:26 PM, Mike Wilson <mikewse at hotmail.com> wrote:

> Justin Lebar wrote:
> > Mike Wilson wrote:
> > > 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.
>
> Hm, it seems you didn't get my point. I was referring to
> your statement saying that it wasn't possible for the form
> field value persistence to do its job because the textarea
> was created and populated onload. I was pointing out that
> this is not the case, as the textarea and its content
> are indeed delivered in the "static" HTML right from the
> server and not created onload.
> Thus, this textarea is fully functional with the browser's
> form field value persistence mechanism, as can be seen if
> you revisit the textarea within the same browser session.
>
> I understand that persistence between browser restarts is
> one of your goals, but I have never said that the current
> incarnation of form field value persistence persists
> between browser restarts. Or are you saying that?
> Indeed, if Mozilla's implementation did that, I would
> expect it to work straight off with the discussed bugzilla
> page, due to its simple and form-friendly design.


I think whether or not a particular UA persists form field data (or anything
other than history API data) is completely orthogonal to this discussion.
 For the sake of this discussion, lets assume there's some UA out there that
ONLY persists history API data for recovery.  That way the history API
doesn't depend on any of these other features.  Agreed?

Getting back to your question, with both the original and the newly proposed
API this is possible.  The difference is that with the newer API, it's much
easier to update an entry.  For example, if I wanted history to include what
was typed into a particular form field, I could just keep updating the
history entry whenever the text changes or when I add a new history entry.
 With the old API, I'd have to create a unique ID that gets pushed via the
history API, and then maintain all of that state elsewhere.  I then depend
on either both or neither of those APIs surviving a recovery.

This is one of the reasons I think the proposed changes to the API are much
more usable.

J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090821/1f4cfdb0/attachment.htm>


More information about the whatwg mailing list