0
How HTML 5 is more powerful in terms of storage?
Help me pls with my homework
1 Resposta
+ 1
It sounds like you're referring to web storage.
Cookies existed since the 1990's. The amount of data in cookies is very small at just a 4 kb maximum for a website.
localStorage was introduced to most popular web browsers since 2011. localStorage has much larger limits like 5MB or 10MB.
sessionStorage is very similar to local storage except that it is cleared when you close the browser or leave a website. session storage was introduced the same time local storage was introduced.
Cookies are passed with every HTTP request while local storage and session storage isn't.
There is a little more detail at:
https://www.w3schools.com/html/html5_webstorage.asp
Yet more detail is at:
https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage
https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
The most detail is in the official specification at:
https://www.w3.org/TR/webstorage/