However, as the designer you decide what’s necessary.
<input type="button" value="Go Back From Whence You Came!" onclick="history.back(-1)" />
We use the input type as button, label our button with “Go Back From Whence You Came!”, then using the onclick attribute we use the “history.back(-1)“ value which tells our browsers go back 1 in history.
Definition and Usage
The back() method loads the previous URL in the history list.
This is the same as clicking the “Back button” in your browser, or history.go(-1).
Note: This method will not work if the previous page does not exist in the history list.
Tip: To load the next URL in the history list, use the history.forward() method.