Browser Trends: Offline Storage
January 6, 2008 – 5:32 pmI’ll start my exploration of the future of web browser technology by discussing some key trends that will come to the fore in 2008. The first is the addition of local storage capabilities to web browsers. This is an area that kicked into high gear last year with Mozilla’s work on offline apps, Google Gears and DOM Storage, the Mozilla term for what the WHAT WG standards group has pithily dubbed “client-side session and persistent storage of name/value pairs”.
As web apps have continued to encroach on what was previously the sole realm of the desktop, the “airplane problem” has become increasingly evident. Although Ajax applications actually download their code onto the client before running it, they are still impossible to use if you’re not connected to the internet. In part this is because browsers don’t yet have the smarts to hold on to code that might be needed later. Leave your Gmail inbox and you won’t to be able to get it back without a live net connection. Moreover, you wouldn’t be able to do anything interesting anyway since all of your data is stored on some remote server and thus inaccessible when you’re offline.
The iPhone is a poignant illustration of this problem. When Apple announced that Safari would be the SDK for its new phone, industry observers were skeptical. Although the central theme of this blog is that the distinction between web apps and their desktop-based counterparts is eroding, Safari is simply not yet up to the task. One of the main lacks is the need to be online to use third-party web apps. There are many instances when this is impossible or inconvenient: on airplanes, as mentioned, but also when roaming, when you don’t have an unlimited data plan (you dirty hacker you) or any time you’re away from a wifi connection and have to rely on the glacial EDGE network.
Mozilla began tackling the problem at the beginning of 2007. Browsers already store JavaScript downloaded from web sites in their cache to speed subsequent loading of these sites, but not in a way that makes it usable when offline. What is needed is a persistent cache specifically designed for this purpose. The new functionality, which is based on a specification being fleshed out inside the WHATWG, is slated to be included in Firefox 3. Complex applications like Zimbra have already been adapted to take advantage of it. According to Ars Technica, Apple is “jamming on adding offline storage capabilities to Safari” for use on the iPhone. Since Apple is an active participant in the WHATWG, it’s reasonable to expect that their implementation will be compatible with Mozilla’s from the perspective of web developers.
The other contender is Google Gears, which also provides capabilities for storing code and data locally for use without internet access. Google has a couple of advantages over the WHATWG. For one thing, it controls some of the most popular Ajax applications on earth. Also, Gears is distributed as a browser plugin and supports Internet Explorer as well as Firefox (with Safari support on the way). This gives Google end-to-end control analogous to that enjoyed by Apple with iTunes (both the music store and the client) and the iPod. The WHATWG crowd has to convince web application developers to support its specification, and it has to deal with the fact that IE users are currently out in the cold.
So where is Microsoft in this story anyway? I couldn’t find any indication that they have offline capabilities at all, existing or planned. I suspect we may be in for a big surprise announcement when IE 8 is released this year. Perhaps they are even planning to support the WHATWG spec. That would be a real shocker but might make sense if they perceive their real rival in this game to be Google rather than Mozilla or Apple.
No discussion of offline capabilities for browsers would be complete without mentioning SQLite. Every solution in this space has one thing in common: they all use this small, fast, reliable embedded SQL database. Adobe has also adopted it for use in AIR, its platform for standalone web apps. It’s safe to say that SQLite has accelerated the rollout of offline-capable browsers by at least a year or two. It also has some of the most liberal licensing terms out there. D. Richard Hipp, its creator, is a genuine tech hero.
Next time in browser trends we’ll explore the rise of site-specific browsers and rich internet applications.
7 Responses to “Browser Trends: Offline Storage”
Note that Ian Hickson, the WHATWG chair and HTML5 spec editor, works here at Google and is in communication with the Gears team. I think your post implies more competition between Gears and the HTML5 spec than really exists — as far as I’m aware everyone involved wants the ultimate result to be a good, clean set of APIs usable by developers everywhere. There are simply different routes to get there. Real developer experience using Gears is informing the HTML5 spec.
Also note that Gears is more than just offline storage — among other things, it provides auto-syncing or resources into that offline storage, as well as background JS threads.
By Peter Kasting on Jan 7, 2008
Peter,
I imagine that Google is feeling the tension between cooperating with the WHATWG standards effort and forging ahead on its own. This doesn’t imply any criticism of the WHATWG specifically, but the reality is that it’s much harder to innovate and move quickly inside an industry consortium than it is if you go it alone.
One would certainly hope that the two efforts will converge eventually, and the fact that Ian is a Google employee is a hopeful sign in that regard.
By Matt on Jan 8, 2008
Limited persistent data in IE:
http://samples.msdn.microsoft.com/workshop/samples/author/persistence/userData_1.htm
http://msdn2.microsoft.com/en-us/library/ms531424(VS.85).aspx
By Bart on Jan 10, 2008
Since Microsoft doesn’t consider the WHATWG to be a “real” working group of any import, I really doubt they will go out of their way to implement anything from the WHATWG in IE8. That would be pretty out of character.
By Al Billings on Jan 11, 2008