Get started with history CDN
MIT licensed
History.js is a lightweight library for managing the browser history without page reloads.
Tags:- history
- location
Stable version
Copied!
How to start using history CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with history CDN - cdnhub.io</title>
<script src="https://cdn.cdnhub.io/history/5.3.0/history.development.js"></script>
</head>
<body>
<button id="goBack">Go Back</button>
<button id="goForward">Go Forward</button>
<script>
const history = new History();
history.listen((state, action) => {
console.log('State changed to:', state.url);
});
document.getElementById('goBack').addEventListener('click', () => {
history.go(-1);
});
document.getElementById('goForward').addEventListener('click', () => {
history.go(1);
});
</script>
</body>
</html>
Copied!
Copied!
Copied!
All versions
1.10.0
1.10.1
1.10.2
1.11.0
1.11.1
1.12.0
1.12.1
1.12.2
1.12.3
1.12.4
1.12.5
1.12.6
1.13.0
1.13.1
1.14.0
1.15.0
1.16.0
1.17.0
1.9.0
1.9.1
2.0.0
2.0.0-rc1
2.0.0-rc2
2.0.0-rc3
2.0.1
2.0.2
2.1.0
2.1.1
2.1.2
3.0.0
3.0.0-0
3.0.0-1
3.0.0-2
3.1.0
3.2.0
3.2.1
3.3.0
4.0.0
4.0.0-0
4.0.0-1
4.0.0-2
4.0.1
4.1.0
4.10.0
4.10.1
4.2.0
4.2.1
4.3.0
4.4.0
4.4.1
4.5.0
4.5.1
4.6.0
4.6.1
4.6.2
4.6.3
4.7.0
4.7.1
4.7.2
4.8.0-beta.0
4.9.0
4.9.0-beta.2
5.0.0
5.0.0-beta.0
5.0.0-beta.3
5.0.0-beta.4
5.0.0-beta.5
5.0.0-beta.6
5.0.0-beta.7
5.0.0-beta.8
5.0.0-beta.9
5.0.1
5.0.2
5.0.3
5.1.0
5.2.0
*** 5.3.0
5.3.0-pre.0