Summary: | Broken behavior for back-button after history.pushState() + location.replace() | ||
---|---|---|---|
Product: | WebKit | Reporter: | Sean Hogan <shogun70> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | UNCONFIRMED --- | ||
Severity: | Major | CC: | aroben, beidson, bugzilla, fishd, josh, shogun70, timdream, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Description
Sean Hogan
2012-03-09 04:37:02 PST
The same broken behavior is also exhibited if step 3 is: location.reload() A work-around for this issue is to replace step #3 with: history.replaceState({}, null, currentURL); location.replace(nextURL); where currentURL = "http://www.webkit.org/" or "/" nextURL = "/blog/" for the demo given above. This work-around can cause a flash of the currentURL in the address bar, and it seems bizarre that this should work while the straight-forward code path fails. An almost satisfactory work-around for this issue is to replace step #3 with: history.replaceState({}, null, "#"); location.replace(""); I guess this indicates that identified bug is only an issue when `location.replace(url)` is the precise equivalent of `location.reload()` (and there has been a previous invocation of `history.pushState`.) *** Bug 93506 has been marked as a duplicate of this bug. *** See https://bugs.webkit.org/show_bug.cgi?id=93506 for a live test case. AFAICT this behavior disagrees with the spec and with Firefox. |