JavaScript Window history.back()
JavaScript Window history.back()
The history.back() method is used for loading the previous URL i.e, the page in the history list. It only works if the previous page exists. It is the same as history.go(-1) or by clicking Back button on your browser.
Syntax:-
Its syntax is:- history.back()