Local Storage and its AdvantagesLocal Storage is the space where your data is stored locally on the client-side machine and it will be preserved even if the user closes their browser. This preserved data can be used and loaded again when the user try to access the application at some later time. Below are some of the advantages of HTML 5 storage over cookie-based storage:
- Every data is stored totally on the client.
- The data does not shuttle between the client and server on each request or response. The size of the storage space is large compared to that of a cookie.
- Session-based storage is available.
Browser SupportWeb storage supported browsers are - Firefox, Internet Explorer 8+, Opera, Safari and Chrome. And the browser which does not support Web Storage is Internet Explorer 7 and earlier versions. Store data on the client side - It is one of the most amazing features of HTML5, which is storing information in user’s browsers: When the user closes the browser, and comes back again, he will be able to access everything easily without loading it again and will be able to see things as he left it.
- You will be able to store user preferences without keeping that data on your server.
- It is much faster as well as secure.
- Its storage limit is at least 5MB.
- The data will never transfer to the server.