history.go(x) is equivalent to the user clicking his forward button x times in the browser. However, you can specify the distance to move, that is history.go(5); . This equivalent to the user hitting the forward button in the browser five times.
Similarly, you can specify negative values as well to make it move backward. Specifying 0 or no value will simply refresh the page:
history.go(5); // forwards the browser 5 timeshistory.go(-1); // similar effect of clicking back buttonhistory.go(0); // refreshes pagehistory.go(); // refreshes page