Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for The History API in 256 characters!
Mateus Abelli
Mateus Abelli

Posted on

     

The History API in 256 characters!

This is a submission for DEV Challenge v24.03.20, One Byte Explainer: Browser API or Feature.

Explainer

Move back and forward between your page history! All you need is access to the window global object then callhistory.forward() orhistory.back(), but you can also jump to a specific index withhistory.go(2), usehistory.length to see the total of entries.

Additional Context

I picked this one for the challenge because I knew it would not be very complex to write in a tutorial format. I usedMDN as reference andcharactercountonline to count the characters while composing the text.

I hope this packs enough info to actually help you learn about the history API, it is indeed that simple.

Cover Art created withGIMP
Photo by Suzy Hazelwood atPexels

Thanks for reading!

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Today is a good day to learn something new 🌱
  • Location
    Brazil
  • Joined

Trending onDEV CommunityHot

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp