Web Storage API vs. Cookies for Browser Data Storage
In fact, using a cookie to store data often becomes a challenge to avoid race conditions. Also, the cookie data available for a typical website is a lot smaller than Web storage's 5MB or 10MB, depending upon the browser. Web storage also offers a more secure method for storing client-related information. Unlike a cookie, Web storage data is not carried over to the server via HTTP. So Web storage data can be accessed only via client-side scripts. This means the server cannot read or write directly to Web storage.
In his WebReference article, Sachin Khosla introduces the Web Storage API and explains how it enables storing data in a more secure and efficient way than cookies.
Read the full story at WebReference:
Web Storage API: More Security, Efficiency and Capacity than Cookies