Bug 22224
Summary: | window.location.replace seems to save the session history | ||
---|---|---|---|
Product: | WebKit | Reporter: | Anantha Keesara <anantha> |
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | littlecooldude, mihaip, vermavee, webkit |
Priority: | P2 | Keywords: | HasReduction |
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | OS X 10.5 | ||
URL: | http://desktop.nostdal.org/~lnostdal/test.html |
Anantha Keesara
chromium bug:http://code.google.com/p/chromium/issues/detail?id=1919
Code snippet:
<html>
<head>
</head>
<body onload="var before = history.length;
window.location.replace('#blah');
var after = history.length;
if(before != after)
alert(before + ' != ' + after);
">
<a href="test.html">again..</a>
<p/>
(also, it seems i need to click twice on the link for it to trigger a
reload .. which isn't the case in FF)
</body>
</html>
..works as expected (does not add history entry) under FF, Opera and IE
Nightly tested: r38293
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
sunsean
This bug often causes infinite loops (when pressing the back button) on pages that attempt to set a default hash if there is none.
if(!location.hash) location.replace('#home');
Mihai Parparita
*** This bug has been marked as a duplicate of bug 42861 ***