SessionStorage v/s Cookies

SessionStorage is an alternative to session cookies, but more powerful. The data recorded in the storage are available in all web pages from the same site and to the same user during the session. However, the real advantage is that when using Session Storage it is possible to carry out multiple transactions in different windows at the same time.Cookies don’t really handle this case well.

SessionStorage is created for a new visitor and deleted when the user disconnects, or at the request of a script, so it is similar to the session manager of PHP, and it allows for example to register a password to a user to access all services while he stays connected.
Like they do in Google!!

In Internet Explorer 8, the space provided to sessionStorage reaches 10 mega bytes when it is 4 KB for each cookie.
Since HTML5 does not support all versions of browsers. Browser support of the object may be checked with this

JavaScript code: if(sessionStorage == null) document.write("Storage not supported by the browser");

You can use sessionStorage directly. It must be explicit if that designate  another window than the current window.

Values are stored in attributes of the instance of sessionStorage:

Values are stored in attributes of the instance of sessionStorage:

sessionStorage.login = "user"; or sessionStorage["login"] = "user";

You can access the data stored in the same way:

var login = sessionStorage.login;

These attributes are not predefined, they are key as in an array that are created dynamically.

150 150 Burnignorance | Where Minds Meet And Sparks Fly!