Using History API to Animate URL and hmm what else?

preview_player
Показать описание
from MDN: The DOM Window object provides access to the browser's session history (not to be confused for WebExtensions history) through the history object. It exposes useful methods and properties that let you navigate back and forth through the user's history, and manipulate the contents of the history stack.

🏭 Backend Engineering Videos

💾 Database Engineering Videos

🛰 Network Engineering Videos

🏰 Load Balancing and Proxies Videos

🐘 Postgres Videos

🚢Docker

🧮 Programming Pattern Videos

🛡 Web Security Videos

🦠 HTTP Videos

🐍 Python Videos

🔆 Javascript Videos

Become a Member

Support me on PayPal

Become a Patreon

Stay Awesome,
Hussein
Рекомендации по теме
Комментарии
Автор

The primary reason single page apps use this API is to support functions like bookmarks and sharing the link. Also to enable the use of forward and back buttons.

ommahajan
Автор

History can store the state of the single page app. When doing routing it changes the page content without server side rendering thus url can be the same and the dom is still updated. Makes apps feel more native on web

markoogi
Автор

I think if remember correctly, after going to "/111" and then "/222", if we hit refresh on "/222" and then do .back(), the state is preserved which is quite powerful as in-memory state will be cleaned out and I believe most people use localStorage in that scenario, but history state can preserve it.
Probably need two page 111.html and 222.html and try out with history api, I haven't checked for now

PiyushChauhan
Автор

History is used for routing in a single page application mostly

patelmalavdev
Автор

I have used it for Back Button functionality in JS function.

habeebmatrix
Автор

If the server has Broken Refer based csrf protection, it's also useful for bypass protection

raminiskandarov
Автор

Thank you so much for the effort you put in. I had a request, could you make a tutorial on Docker? A crash course of some sort.

backup
Автор

It is useful in single page applications, to do client side routing

saratalefe
Автор

Can be used in SPA.. if not, when press device back button, browser quits..

AkinZeman
Автор

can you explain only about apis like why are they used, how apis work, what can we achieve with apis?

sailsh
Автор

I really like your videos man. Could you please make a video about how to use rabbitMQ/kafka for microservices or event sourcing?

kylehipolito
Автор

Ahah, not really animations, their are reasons why HTML blink element has been removed, this is forbidden ! 😂
Real use case: to handle navigation in single app page

LordNementon
Автор

Hussain, you suggest us not to use framework?

ahmedkhudhair
Автор

This stuff very usefull for Hacking damn!!

raminiskandarov