1//As an HTTP redirect (back button will not work )
2window.location.replace("http://www.google.com");
3
4//like if you click on a link (it will be saved in the session history,
5//so the back button will work as expected)
6window.location.href = "http://www.google.com";
7