When you click on a link, navigation happens and the URL hash is updated. The framework allows you to replace the URL
hash to a full path in browsers that support the history.replaceState
API. This recipe shows you how to do this using the $.mobile.pushStateEnabled
configuration. It also shows you how to use the $.mobile.linkBindingEnabled
configuration that allows the framework to automatically bind the clicks on the anchor links in a document. Both these are true
by default.
Copy the full code of this recipe from the sources code/07/push-state
folder. You can launch this code using the URL: http://localhost:8080/07/push-state/main.html
.