Javascript Five ways to navigate
Javascript Five ways to navigate:

This page will show you five ways to navigate.
See to the right of here, how the five code snippets works.
On the HTML tab you can see some examples, ready to paste in to your page.

 Five ways to navigate

Here are five ways to navigate using Javascript snippets.

  • The first will read in the new URL, over or instead of the current
  • The second will send you to the new URL.
  • The third will load an URL in the same broser tab that you already have open
  • The fourth will reload the current page
  • The fifth will also reload the current page
 So, as you see there are a few ways to do thing, but they mainly do the exact same. Open a new page for you, or reload the page where you already are.


<A HREF='javascript:location.replace("")'>Load page</A>
<A HREF='javascript:window.location.assign("")'>Load page</A>
<A HREF='javascript:window.location.replace("")'>Load page</A>
<A HREF='javascript:location.reload()'>Reload page</A>
<A HREF='javascript:location.reload(true)'>Reload page</A>



Icons made by Freepik from This page will show you five ways of navigating pages using simple Javascript.