Subject: window.location.replace vs. window.location =
Author: WebSpider
Posted on: 02/09/2011 07:48:18 PM
Is there any difference between the last two lines?
<script language='JavaScript'>
var url = "http://www.google.com/";
window.location = url;
window.location.replace (url);
</script>
The difference is how history is handled. "replace" won't give you the history.
References: