Reference article:
W3c:http://www.w3.org/html/ig/zh/wiki/html5/history
Zhang Xin Xu: http://www.zhangxinxu.com/wordpress/2013/06/html5-history-api-pushstate-replacestate-ajax/
zawa:http://zawa.iteye.com/blog/1271031
Demo:demo
:
Code:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
Postscript:
This "history.pushstate" must be on the service side to be able to sign the zodiac, so this page opens on the server.
In general, the API front of the article is very detailed:
History.pushstate three parameters The first parameter is the stored data, the second value is set the value of Document.title (although this method is not fully implemented yet), the third value is the URL path (this need and background mates ...). In fact, I do not know very well .... );
Window.onpopstate equivalent to the value of ev.state is history.pushstate stored data values;
Window.onhashchange as long as the location has a change on the execution method of the event;
His application of course some say is to do this page of the record what actually also can do these one-stop development of open judgment, I this demo is a simulation of one-stop development meaning.
Html5-history History Management