Get to know local storage in HTML5

With the widespread of the internet, millions of users from all over the world enter millions of sites on a daily basis. In lots of cases some users visit the same website several times and due to this some sites started saving the user data in order to show them the news that interest them when they visit their site again. Some websites started asking users to register in the site in order to create a personal profile for each user that he can log in to when he visits the site and when he logs in he can view all the data related to him from messages to pictures to news. In order for sites to be able to perform this it needed a space where it can save the user data. HTML 5 provides the local storage feature which helps in storing user’s data.

What is local storage in HTML 5?

It is a way that enables web pages to store user’s data within the client web browser and to keep the data stored even if the user closed the web page and navigated to another one. This feature is similar to “Cookies”.

What is the difference between Local storage and cookies?

Local storage gives you way greater storage capacity than cookies. In the case of cookies you can access the user data through the server or through the client side, but in the case of local storage you can only access the data through the client side. Cookies are also included with every HTTP request which slows down your web application.

This feature is available in the majority of browsers and its considered to be a perfect way for increasing the internet speed ,providing more storage space and protecting the privacy of the users.