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.