How to rewrite URL without refresh, like GitHub.com

Github uses window.history.replaceState()

Here you can see how they do it


XMLHttpRequest is used on the client-side in Chrome/Webkit browsers to fetch server-side resources without page refreshing, and content is dynamically loaded in, and animations can be hooked in during that content being appended.

I'm not sure exactly why only Chrome is targeted by the ajax, as usually the hash mark changes when ajax is applied in the same manner ( like twitter ).

For the url changing dynamically, I believe all that's done is location.href is updated. On second thought, it could be some new HTML5 feature that only chrome supports.