Question: I am newer to JavaScript and I am working on a website where I want to be able to switch the URL when I click on certain elements of the site without reloading the page.

I want it to work like <http://www.itemcycle.com> when you click on the link to sell your iPad or iPhone and then select your model. It shows different boxes, and when you click on them, it changes the URL but I know it's not loading a new page because it doesn't scroll me back to the top.

Thanks in advance for your help!

Answer: 
what you are seeing is a single page application 

> 
> A single-page application (SPA), also known as single-page interface
>  (SPI), is a web application or web site that fits on a single web page
>  with the goal of providing a more fluid user experience akin to a
>  desktop application.
> 
> 
> 

It will be achieved by using certain JS frameworks. AngularJS is the popular one.
HTML5 introduced the history.pushState() which allows you to add and modify history entries.

```
window.history.pushState('page1', 'Title', '/page1.php');

```

This might worth looking.