Source code
Revision control
Copy as Markdown
Other Tools
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
<!DOCTYPE html>
<html>
<head>
<title>Navigation by manipulating the browser history</title>
<script type="text/javascript">
function forward() {
let stateObj = { foo: "bar" };
history.pushState(stateObj, "", "navigation_pushstate_target.html");
}
</script>
</head>
<body>
<p>Navigate <a onclick="javascript:forward();" id="forward">forward</a></p>
</body>
</html>