HTML5 history has added two properties, namely Replacestate () and Pushstate (), and does not refresh the URL of the page change page.
Replacestate () Can change URLs without a page refresh
Usage: History. Replacestate("Data","title of page","changed url")
<body><input type= "button" value= "buttons" id= "btn" ></body><script>$ (' #btn '). Click (function () { History.replacestate (null, "title", "aa.html?name=12345"), History.replacestate (null, "title", "bb.html?name=67890" );}) </script>
PS: the title of some pages can not be changed after testing
Pushstate () is a record of inserting a URL into the browser history, and then inserting it at the very top of the record (array), the same way replacestate can make the page not refresh the URL change, the difference is the URL can be returned to the previous record through the browser, The advantage is that you can return to the pre-render record by using the browser Back button after the AJAX partial rendering page
Usage: History. Pushstate("Data","title of page","changed url")
<body><input type= "button" value= "buttons" id= "btn" ></body><script>$ (' #btn '). Click (function () { History.pushstate (null, "title", "aa.html?name=12345"), History.pushstate (null, "title", "bb.html?name=67890");}) </script>
History replacestate/pushstate