The window.history object does not need to use the window prefix when writing. To protect user privacy, JavaScript's methods of accessing this object are restricted.
Method:
history.back() - Loads the previous URL in the history list, this is the same as clicking the forward button in the browser
history.forward() - Loads the next URL in the history list, this is the same as clicking the forward button in the browser Clicking the forward button in the browser is the same
Example: