RESOLVED DUPLICATE of bug 42861 22224
window.location.replace seems to save the session history
https://bugs.webkit.org/show_bug.cgi?id=22224
Summary window.location.replace seems to save the session history
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.