Working with Web Storage – part 001.

What is Web Storage?
Web Storage is a specification that was a part of HTML5 and it also named DOM Storage.
The developers usually only store user and/or session identifiers in cookies, and then use databases to use the rest of the user data.
The limitations of cookies are:
– our search and browsing history can be tracked and our privacy is a concern.
– they have data capacity limitations.
– the limit of cookies in web browsers is about 4 KB per cookie.
There are two types of Web Storage objects: sessionStorage and localStorage.
sessionStorage – our data is accessible to any page from the same site opened in that window.
localStorage – our data spans multiple windows and lasts beyond the current session.
Where Web Storage is used?
You can store the data online to-do stuff.
Also, images can be stored in strings using Base64 encoding.

The output is shown in the next image.

web storage free-tutorials.org

With Google Chrome Browser, you can use three types of storage: Temporary, Persistent, Unlimited.

But, this HTML5 simple feature which is implemented in all the modern browsers local storage.

Using Web Storage is really not more secure than cookies.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.