For that you can use
HTML5 Web Storage.
Quote:
With HTML5, web pages can store data locally within the user's browser.Earlier, this was done with cookies. However, Web Storage is more secure and faster. The data is not included with every server request, but used ONLY when asked for. It is also possible to store large amounts of data, without affecting the website's performance.The data is stored in key/value pairs, and a web page can only access data stored by itself.
There are two new objects for storing data on the client:
localStorage - stores data with no expiration date
sessionStorage - stores data for one session
Check this for more info.
HTML5 Web Storage