With local storage, web applications can store data locally within the user’s browser. Before HTML5, application data had to be stored in cookies, included in every server request. Local storage is more secure, and large amounts of data can be stored locally, without affecting website performance. Unlike cookies, the storage limit is far larger (at least 5MB) and information is never transferred to the server. Local storage is per domain. All pages, from one domain, can store and access the same data.
window.localStorage – stores data with no expiration date
window.sessionStorage – stores data for one session (data is lost when the browser tab is closed)
Smashing Mag has a great little article on the ins and outs of local storage. If you want to work with it more — you may want to consider reading it. Local storage can be useful.