Page 1 of 1

JavaScript Window History

Posted: Fri Oct 27, 2023 9:07 am
by Guest
JavaScript Window History


The window.history object contains the
browsers history.

Window History
The window.history object can be written without the window prefix.
To protect the privacy of the users, there are limitations to how JavaScript
can access this object.
Some methods:

history.back() - same as clicking back in the browser
history.forward() - same as clicking forward in the browser


Window History Back
The history.back() method loads the previous URL in the history list.
This is the same as clicking the Back button in the browser.

Example
Create a back button on a page:

<html>
<head>
<script>
function goBack() {
  window.history.back()
}
</script>
</head>
<body>

<input type="button" value="Back" onclick="goBack()">

</body>
</html>
The output of the code above will be:












Window History Forward
The history.forward() method loads the next URL in the history list.
This is the same as clicking the Forward button in the browser.

Example
Create a forward button on a page:

<html>
<head>
<script>
function goForward() {
  window.history.forward()
}
</script>
</head>
<body>

<input type="button" value="Forward" onclick="goForward()">

</body>
</html>
The output of the code above will be:


















+1

Reference: https://www.w3schools.com/js/js_window_history.asp

Re: <t>JavaScript Window History</t>

Posted: Wed Nov 19, 2025 5:49 pm
by alexseen
Ich bekam Lust auf kurze Spiele zwischendurch und schaute verschiedene Casino-Seiten an, die stabil laufen. Eine davon präsentierte rockyspin bonus, und die Oberfläche sieht recht klar aus und lädt schnell. Die Bonusdetails ähneln vielen deutschen Angeboten und sind einfach geschrieben, ohne Fachwörter oder verwirrende Punkte. Gut fand ich, dass man nicht lange suchen muss, um wichtige Infos zu finden und direkt spielen kann.