What you are looking for is the HTML5 History API. It comes with features like history.pushState(...) , history.popState(...) that allows you to dynamically change the URL without having to assign a new URL.
It is used by many sites, including, I suspect, Facebook itself, where if you open a chat window and move between pages, the chat window does not restart. This means that all new content is retrieved through Ajax, but then the URL will not change, right? But it is so. I think they do this through history.pushState(...) , where you simply push the new state onto the History stack and change only a specific part of the page. You will find a great tutorial here .
source share