August 20, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Web Storage API vs. Cookies for Browser Data Storage

  • June 14, 2010
  • By Sachin Khosla
  • Send Email »
  • More Articles »

All websites currently use cookies to store client-related data, and while cookies are definitely a good method for storing client-related information, they are not always efficient. The Web Storage API, first introduced as a part of HTML5 and now developed as a separate standard by the W3C, is a more secure, efficient and higher capacity option.

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


Tags: W3C, browsers, data storage, cookies, Web Storage




Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel