
Redirecting a client to another page using JavaScript
The JavaScript snippet below will redirect a user to another page when loaded. Typically, you'll want to avoid client-side redirects like this. However, there may be certain situations where they are ideal.
window.location = "http://localhost/some/page";