September 26, 2020
Hot Topics:

Web Storage API vs. Cookies for Browser Data Storage

  • 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

This article was originally published on June 15, 2010

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date