Use History API.

Instead of reloading the page, use pushstate and popstate when navigating.