理解浏览器历史记录(2)-hashchange、pushState
History(Window.history对象)对象保存着用户上网的历史记录。处于 安全方面的考虑 ,开发人员无法得知用户浏览过的URL,但是借由用户访问过的页面列表,同样可以在不知道实际URL的情况下实现后退和前进。 History对象概况: ------------------------------------------------------------------------------------------------------------------------------------------------------- Manipulating the browser history Manipulating the browser history The DOM window object provides access to the browser's history through the history object. It exposes useful methods and properties(方法和属性) that let you move back and forth through the user's history, as well as -- starting with HTML5 -- manipulate the