Since this API is not available in all browsers (older ones, especially IEs, do not have it) it is usually a good idea to use a wrapper such as History.js which either turn the calls in no-ops in those browsers or emulate them by using the hash part (after #) of the URL.