HTML 5 has the capability to store data locally. Previously it was done using cookies.
The exciting thing about this storage is that it's fast as well as secure. There are two different objects that can be used to store data.
localStorage object stores data for a longer period of time even if the browser is closed.
sessionStorage object stores data for a specific session.