Web Storage (or DOM storage) represents a mechanism for a better and more secured way of persisting data on the client than cookies. Web Storage is better in the following situations:
There are two Web Storage objects (
Local) that can be used to persist the user data in the web browser for the length of the session and indefinitely. Both of them have a similar simple API declared via the Storage interface. ...