The HTML5 brought a lots of amazing technologies in the web . It also brought API called Storage API . This api is used to set and retrieve data stored on user's device. This is better than cookies . 1. Apart from being an old way of saving data, Cookies give you a limit of 4096 bytes (4095, actually) - its per cookie. Local Storage is as big as 5MB per domain. 2. localStorage is an implementation of the Storage Interface. It stores data with no expiration date, and gets cleared only through JavaScript, or clearing the Browser Cache / Locally Stored Data - unlike cookie expiry. As you may have thought this property can be accessed using window object. This api has two properties namely sessionStorage and localStorage .(Remember we use camelcase in the name). As you may have assumed the localStorage property stores data on user's device until it is deleted by the user (clearing cache) or by the script itself , w...