How to use 'window.history.back()' in JavaScript

Every line of 'window.history.back()' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
65function forward(steps = 1) {
66 if (canGoForward(steps)) {
67 currentPosition += steps;
68 } else {
69 currentPosition = historyData.length - 1;
70 }
71
72 process.nextTick(notifyListeners);
73 return current();
74}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

113back() {
114 history.goBack()
115}

Related snippets