Join Bill Weinman for an in-depth discussion in this video Manipulating browser history, part of HTML5: Managing Browser History.
The HTML5 session history API is a small set of objects and methods for…manipulating the history stack in a browser.…With this API you may add items to the browser history and change the location…URL without initiating a new connection to the web server.…This has great value for AJAX and other applications that may want to update a…page without causing a complete page reload, while still providing bookmarkable…URLs for your users.…Officially, the spec is called the HTML5 session history and navigation API.…
It's a simple spec, and it's fairly stable.…The implementations are a little inconsistent, but it's not difficult to manage.…The HTML5 session history API requires a network connection;…it will not work on a local file on your system.…The reason for this is that it requires a host name, and it requires that the…host name not be changed in any of the URLs that are pushed onto the stack, as…this would be considered a security risk.…So in order to follow along with the exercise files in this course, or even to…
- Manipulating browser history: an overview
- Detecting History API support
- Pushing a new URL onto the stack
- Handling back and forward buttons with the popstate event
- Updating the stack with replaceState()