x Share your thoughts on trends and content!

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)

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login 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

General Feedback
Marketing and all content copyright © 2006-2016 C4Media Inc. hosted at Contegix, the best ISP we've ever worked with.
Privacy policy

We notice you're using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.