Understanding storageSession in HTML with an example

The sessionStorage property is used to access a session Storage object for the current origin URL. It works similar to localStorage, the difference being that while data is stored permanently in localStorage and sessionStorage data is cleared when the browser tab is closed, ie when a page session ends.


This is a companion discussion topic for the original entry at http://iq.opengenus.org/storagesession-in-html/