This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 8629 - history.pushState should clear forward history
Summary: history.pushState should clear forward history
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://dev.w3.org/html5/spec/Overview...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-04 18:48 UTC by Darin Fisher
Modified: 2010-10-04 14:49 UTC (History)
4 users (show)

See Also:


Attachments

Description Darin Fisher 2010-01-04 18:48:14 UTC
history.pushState should clear forward history

The spec currently says:

 "If the method invoked was the pushState() method:

  Remove from the session history any entries for the Document
  from the entry after the current entry up to the last entry
  in the session history that references the same Document
  object, if any. If the current entry is the last entry in
  the session history, or if there are no entries after the
  current entry that reference the same Document object, then
  no entries are removed."

I believe this behavior is undesirable.  Instead, pushState
should clear the entire forward history regardless of which
documents are involved.

A major use case for history.pushState is to eliminate the
dummy reference fragment navigations used by many apps to add
entries to session history without causing a "real" page load.
In that case, the app author wants to simulate a real page load,
and an important UI component of a real page load is that the
forward navigation button becomes disabled.

It seems strange when a "navigation" doesn't result in a
disabled forward button in the browser UI, so an app developer
may be unsatisfied using pushState in place of reference
fragment navigations.

Moreover, Firefox has implemented pushState in a manner that
clears the forward history.  The Mozilla folks seem to favor
their implementation.  There is also support in the WebKit
community for changing WebKit to match Firefox instead of what
is currently spec'd.
Comment 1 Ian 'Hixie' Hickson 2010-01-15 06:36:30 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.
Comment 2 contributor 2010-01-15 06:37:27 UTC
Checked in as WHATWG revision r4593.
Check-in comment: Rationalise the various places that require the session history to be cleared. Make sure document.open() with replace=true also clears the session history.
http://html5.org/tools/web-apps-tracker?from=4592&to=4593