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
Reported 2008-11-12 18:19:45 PST
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
sunsean
Comment 1 2009-09-17 11:42:33 PDT
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
Comment 2 2011-06-30 18:28:59 PDT
*** This bug has been marked as a duplicate of bug 42861 ***
Note You need to log in before you can comment on or make changes to this bug.