Offline Storage Mechanisms Compared

| by Rob Thornton Follow 0 Followers on Feb 13, 2007. Estimated reading time: 1 minute |

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

Adoption Stage

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


Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you