in JavaScript by
Q:
What is the use of history object?

1 Answer

0 votes
by

The history object of a browser can be used to switch to history pages such as back and forward from the current page or another page. There are three methods of history object.

  1. history.back() - It loads the previous page.
  2. history.forward() - It loads the next page.
  3. history.go(number) - The number may be positive for forward, negative for backward. It loads the given page number.

Related questions and answers

+1 vote
asked Mar 22, 2021 in JavaScript by Robindeniel
0 votes
asked Feb 6, 2020 in JavaScript by rajeshsharma
0 votes
asked Sep 20, 2021 in JavaScript by sharadyadav1986
...