New HTML5 history features pushState and replaceState, and their differences. html5pushstateThe window object in DOM reads the browser's historical records through the window. history method, allowing you to forward and backward in the user's access
Use ajax and history. pushState to change the page URL and history. pushstatePerformance
If you use chrome or firefox to access this blog, github.com, plus.google.com, and other websites, you will find that the clicks between pages are requested
This paper is the official HTML5 training course for Brother Lian it educational institution, mainly introduces: HTML5 new features "Pushstate" and "Replacestate"Recently, when dealing with the browser disable brush function, a new attribute is used:
recently, when dealing with the browser disable brush function, A new attribute is used:history.pushstate ();The official explanations are as follows:The History.pushstate () method and the History.replacestate () method allow you to add and modify
Https://developer.mozilla.org/en/DOM/Manipulating_the_browser_historyThe Window object in the DOM provides a read of the browser history through the Window.history method, allowing you to move forward and backward in the User's access
Starting with HTML5, we can start manipulating this history stack.the Window object in the DOM provides a read of the browser history through the Window.history method, allowing you to move forward and backward in the user's access record.
SPA (Single Page Application) is short for SPA. Applications built using SPA have good user experience and high speed, so you do not need to reload the entire Page for content changes, this avoids unnecessary jump and repeated rendering, which
A few days ago to help students change a management system front-end section, the entire page layout is the header and footer fixed, the left is the navigation bar, the right side of the content display bar ... He used to use an IFRAME to achieve,
PushState, replaceState, and onpopstate are used to refresh the Ajax page forward and backward. history. replacestate
Ajax can be used to obtain data asynchronously and render pages more efficiently.
However, these problems also exist:
Refresh the
History.pushstate and history.replacestate can change the URL without refreshing the current page, but this will not get the content of the new page that gets through Ajax.Although various HTML5 documents say that the Window.onpopstate event can
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.