showing results for - "javascript redirect to homepage"
Giulio
23 May 2018
1// similar behavior as an HTTP redirect
2window.location.replace("http://stackoverflow.com");
3
4// similar behavior as clicking on a link
5window.location.href = "http://stackoverflow.com";
Celya
13 Nov 2017
1<script>
2  window.location.href = "http://mywebsite.com/home.html";
3</script>
Erika
15 Nov 2016
1window.location.href = "http://mywebsite.com/home.html";
Kalista
26 Feb 2016
1window.location = "https://example.com/";
similar questions
queries leading to this page
javascript redirect to homepage