1. url form
1.1. The hash of the URL is location.hash='/foo'
2. HTML5 history mode
2.1、history.pushState({}, ’ ’ , ‘/’)
Equivalent to a stack.
The browser saves the history and can go back.
2.2、replaceState({}, ’ ', ‘/’)
The browser will not save the history and cannot return to the previous page.
2.3、history.go()
history.go(-1) goes one step back. Equivalent to history.back()
history.go(1) one step forward. Equivalent to) history.forward()