Javascript History API
Deveesh Shetty
Posted on March 30, 2024
This is a submission for DEV Challenge v24.03.20, One Byte Explainer: Browser API or Feature.
Explainer
Want to mess with history?
Well, you can, at least in JavaScript. Check out the History API, to go front and back the browser page
history.forward()
- for next page
history.back()
- for previous page
You can try it in the browser console as well.
Additional Context
I recently found it while exploring Web APIs in MDN docs, it is quite handy if you are working with vanilla HTML, and want to go back and forth in browser sessions.
Full document - History API MDN
Thank you for reading!
💖 💪 🙅 🚩
Deveesh Shetty
Posted on March 30, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.