first time site url run the redirect another url code example
Example 1: Which of the following is the correct way to redirect a user to a new page?
window.location = "http://new-website.com";
Example 2: Which of the following is the correct way to redirect a user to a new page?
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");