Home > Web Front-end > H5 Tutorial > Detailed introduction to browser history

Detailed introduction to browser history

伊谢尔伦
Release: 2017-06-11 13:29:14
Original
2033 people have browsed it

The window object in DOM provides reading of browser history through the window.history method, allowing you to move forward and backward in the user's access record. Starting with HTML5, we can start manipulating this history stack. 1. History uses the back(), forward(), and go() methods to move forward and backward in the user's history. Forward and backward: window.history.back(); This method will appear as if the user clicked on the browser tool. Same as the return key on the bar. Similarly, you can also use the following method to generate user forward behavior: window.history.forward(); move to a specific position in the history. You can use the go() method to load a specific page from the session history. Move one page backward: window.history.go(-1); Move one page forward: window.history.go(1); Similarly, you can move forward or back multiple pages. You can also find the total number of pages in the history stack by checking the length property of the browser history. va

1. Detailed introduction about window.history

Detailed introduction to browser history

##Introduction: The window object in the DOM provides reading of browser history through the window.history method, allowing you to move forward and backward in the user's access record. Starting with HTML5, we can start manipulating this history stack. 1. History uses the back(), forward(), and go() methods to move forward and backward in the user's history. Forward and backward: window.history.back(); This method will appear as if the user clicked on the browser tool. Same as the return key on the bar. Same...

2. 6 recommended courses about replaceState

Detailed introduction to browser history

##Introduction: The window object in the DOM provides reading of browser history through the window.history method, allowing you to move forward and backward in the user's access record. Starting with HTML5, we can start manipulating this history stack. 1. History uses the back(), forward(), and go() methods to move forward and backward in the user's history. Forward and backward: window.history.back(); This method will appear as if the user clicked on the browser tool. Same as the return key on the bar. Same...

3.

Recommended courses about history.pushState()

Detailed introduction to browser history##Introduction: In HTML files,  history.pushState() method adds a state to the browser history. pushState() takes three parameters: a state object, a title (now ignored), and an optional URL address. The following will conduct a detailed examination of these three parameters: state object —The state object is a created by the pushState() method and is consistent with the historical record...

##4. Detailed introduction to the usage examples of history.pushState() in h5

##Introduction: In HTML file , the history.pushState() method adds a state to the browser history. pushState() takes three parameters: a state object, a title (now ignored), and an optional URL. The following will conduct a detailed examination of these three parameters: Detailed introduction to browser history

##5.

In-depth understanding of the history features in h5--pushState, replaceState

Introduction: The window object in the DOM provides reading of browser history through the window.history method, allowing you to read the browser history during the user's visit Go forward and backward in the record. Starting with HTML5, we can start manipulating this history stack. Detailed introduction to browser history

6.

Two solutions for Ajax to retain browser history

Introduction: I always download something from github. The entire interface of github is very good and the experience is also very good. I like the special effect of the source code sliding the most. At first I thought it was just an ordinary ajax request effect. , but I found that this special effect can cause the browser address bar to change accordingly, and the code can be slid back and out after clicking the forward and back buttons~~ So let’s study it~

7. Two Ajax solutions to retain browser history

Detailed introduction to browser history

##Introduction: Always Download something on github. The entire interface of github is well made and the experience is also very good. I like the special effect of the source code sliding the most. At first I thought this was just an ordinary ajax request effect, but I found that this special effect can lead to the browser address. The column changes accordingly, and you can slide the code back and out after clicking the forward and back buttons~~ So let’s study it~

8. Detailed explanation of JavaScript operation URL Method (commonly used in single-page applications)

Detailed introduction to browser history

##Introduction: Detailed explanation of the method of JavaScript operating URL (single-page application Commonly used) JavaScript has many methods that can manipulate browser history. Whether it is ordinary page jumps or single-page application hash value changes, we will often deal with these methods, especially in single-page applications, these methods are almost page routing. core method. This article discusses these methods in detail. 1.document.locationlocation is one of the most useful BOM objects. It provides information about the document loaded in the current window and also provides some navigation functions

[Related Q&A recommendations 】:

javascript - Routing of QQ Music web version

javascript - About problems encountered when using isScroll.js

javascript - Browser history as title

The above is the detailed content of Detailed introduction to browser history. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template