Jumping ahead - the history.forward() method

This method is simply the equivalent of history.go(1)

This is handy when you want to just push the user to the page he/she is coming from. One use case of this is when you can create a full-screen immersive web application and on your screen there are some minimal controls that play with the history behind the scenes:

if(awesomeButtonClicked && userWantsToMoveForward()) {    history.forward()}

Get Learn ECMAScript - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.