js redirect page
snippet in javascript

redirect javascript

user5344

// similar behavior as an HTTP redirect
window.location.replace("http://stackoverflow.com");

// similar behavior as clicking on a link
window.location.href = "http://stackoverflow.com";

js redirect page

user2475

window.location.href = "http://mywebsite.com/home.html";

javascript redirect

user6392

<script>
  window.location.href = "http://mywebsite.com/home.html";
</script>

javascript howdo i redirect-to another webpage

user3570

window.location = "https://example.com/";