redirect to homepage javascript

JavaScript
window.location.href = "http://mywebsite.com/home.html";window.location = "https://example.com/";
Source

Also in JavaScript: