1. Home
  2. Javascript
  3. Page redirect

Location is a property of the Window object and it allows to set a new page url effectively acting as a page redirect.

#javascript
window.location = "/new-page.html"
copy
Full Javascript cheatsheet