JavaScript Window history.go()
JavaScript Window history.go()
The history.go() method is used for loading a URL i.e, a page from the history list. It is only usable when a page exists in the history list. The history.go(0) is used for reloading the page. The history.go(-1) is used for going back one page. The history.go(1) is used for going forward next page.
Syntax:-
Its syntax is:- history.go(number)
Further Explanation:-
Parameter | Description |
number | Required. Positive values go forward. Negative values go back. |