How can I redirect to another URL in a web page using JavaScript?
window.location.href = "URL2"
inside a JS block on the page or in an included file; that's assuming you really want to do it on the client. Usually, the server sends the redirect via a 300-series response.
1.4m articles
1.4m replys
5 comments
57.0k users