To achieve this, you can use the HTML5 pushState API . However, only the latest browsers support it, and IE does not yet support it in IE9. There was no way to do this before. However, there is an agreement that you should use location.hash to specify a page whose state was changed using an ajax request. For more information on how to use URL hashes to indicate the state of your page, you can take a look.
There is a History.js library that can be used to migrate to pushState. Its API is very close to the PushState API, but it will transparently provide a hash break if the browser does not support pushState.
Daniel Baulig Aug 05 2018-11-11T00: 00Z
source share