What is the best (correct, modern, cross-browser, safe) way to get a web browser to navigate to a URL of your choice using JavaScript?
This question is related to
javascript
browser
navigation
Try these:
window.location.href = 'http://www.google.com';
window.location.assign("http://www.w3schools.com");
window.location = 'http://www.google.com';
For more see this link: other ways to reload the page with JavaScript
It seems that this is the correct way window.location.assign("http://www.mozilla.org");
Source: Stackoverflow.com