BT

Offline Storage Mechanisms Compared

by Rob Thornton on Feb 13, 2007 |

Niall Kennedy has written an article on boosting Ajax performance using local storage. He discusses four different local storage mechanisms (cookies, Flash local shared object, userData in IE, and DOM storage in Firefox), mentions Dojo Storage as a way to abstract them and concludes that local storage is the next logical step for Ajax applications.

Kennedy describes the potentials of local storage for offline applications that could save changes locally and synchronize with the server when the connection is re-established. While this technique is nothing new, it is being rediscovered.

Just like other web technologies such as JavaScript and CSS, support for local data files addressable from a web page varies by browser. JavaScript libraries such as Dojo Storage abstract each storage method into a single JavaScript call with appropriate storage based on available resources (thanks Brad Neuberg!), but it’s useful to take a look at the low-level options and their respective limitations.

He continues by comparing and contrasting the four different types, describing their size limitations (from the 4KB for cookies to the 5MB for DOM Storage) and how they’re implemented. He concludes with:

Client-side storage addressable from any web page has the potential to change the way we build web pages and the division of labor between client and server. Just as CSS and JavaScript created new ways to style and interact with a page, the client-side storage capabilities of modern browsers will create a new concept of a web application runtime. It’s yet another step in the progression of web applications trying to create the best possible experience using the latest widely deployed web browsers and browser plugins.

In response to the article, there was some conversation on Ajaxian including a discussion of using browser cache. Brad Neuberg, of Dojo Storage, responded that there are two problems with using browser cache:

  • the cache pinning problem
  • application-created information (how to insert into the browser cache)

Hello stranger!

You need to Register an InfoQ account or to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT