This site is mobile accessible. Press the "Tap Here" button to use a different font-size.
Smartphone icons created by Freepik - Flaticon
The Web History API is supported in all browsers:
Yes | Yes | Yes | Yes | Yes |
<button onclick="myFunction()">Go Back</button> <script> function myFunction() { window.history.back(); } </script>
The go() method loads a specific URL from the history list:
<button onclick="myFunction()">Go Back 2 Pages</button> <script> function myFunction() { window.history.go(-2); } </script>
Property | Description |
---|---|
length | Returns the number of URLs in the history list |
Method | Description |
---|---|
back() | Loads the previous URL in the history list |
forward() | Loads the next URL in the history list |
go() | Loads a specific URL from the history list |
Eventually the navigation links, above, will be replaced by these (previous) and (next) buttons below.
JavaScript icons used in the buttons provided by ICONS8.COM. Smartphone icons created by Freepik - Flaticon