Javascript History API

devshetty

Deveesh Shetty

Posted on March 30, 2024

Javascript History API

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
Github | Twitter

💖 💪 🙅 🚩
devshetty
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.

Related

Browser shorts - HTML Drag and Drop API
frontendchallenge Browser shorts - HTML Drag and Drop API

March 31, 2024

IndexedDB
frontendchallenge IndexedDB

April 1, 2024

WebRTC API
frontendchallenge WebRTC API

March 31, 2024

One Byte Explainer: Web MIDI API 🎹
frontendchallenge One Byte Explainer: Web MIDI API 🎹

March 26, 2024

Web Components API in One Byte Explanation
frontendchallenge Web Components API in One Byte Explanation

March 22, 2024