Which of the following is the correct way to redirect a user to a new page?
<meta http-equiv="refresh" content="0; URL='http://new-website.com'" />
4.57
7
window.location = "http://new-website.com";
Thank you!
7
0
3.71
7
window.location = "http://new-website.com";
window.location.href = "http://new-website.com";
window.location.assign("http://new-website.com");
window.location.replace("http://new-website.com");
Thank you!
7
0
Are there any code examples left?
New code examples in category Javascript