Stack OverflowWhich browsers support html5 offline storage?
[+63] [12] Marcin
[2009-07-28 15:08:53]
[ javascript html5 localstorage offline ]

Essentially, I wanted to run a piece of demo code from W3c Offline Webapps [1] page. It looks like that:

 var db = window.openDatabase("notes", "", "The Example Notes App!", 1048576);

Firefox 3.5, IE8 and Chrome do not seem to get it. Is there anybody out there that actually wrote support for that? Or is this wishful thinking about 'the standard of the future'?

(2) Voting to close this question as it is now almost 2.5 years old, and that means it is incredibly out of date in regards to HTML5 features. - slugster
(1) FOr a more up-to-date (and more ontopic) place to see the answer to this question, please see: - jjnguy
[+172] [2009-07-28 17:43:35] brianng [ACCEPTED]

Wikipedia has a table comparing the various browser engines and what portions of HTML5 they support [1].

A reposted internal Yahoo! article [2] also details some differences between localstorage support, to quote:

Firefox 3.5, Safari 4, IE8, Chrome 4+: HTML5 localStorage [3]; these modern browsers all support the core localStorage functionality defined in the HTML5 draft.

Firefox 2.x and 3.0: Gecko globalStorage [4], a very early implementation similar to HTML5’s localStorage.

Safari 3.1 & 3.2: HTML5 Database Storage [5], because Safari 3.1 and 3.2 don’t support HTML5 localStorage.

IE6, IE7: userData persistence [6], a rarely used IE feature for associating string data with an element on a web page and persisting it between pageviews.

Google Chrome Pre 4: Gears Database API [7], which is built into earlier versions of Chrome and thus doesn’t require a separate install.


(2) +1 for a good answer with many sources. - statenjason
(1) Thanks for very extensive answer! - Marcin
There's another answer below but I wanted to add that Chrome 4 and 5 support local HTML5 local storage. The Developer Tools also allow you to inspect locally stored objects. - pnewhook
[+20] [2009-07-28 17:39:45] Ambirex

I believe Safari 3.1 supports openDatabase.

You should check out the PersistJS [1] library, which provides in interface to all the different offline storage capabilities of the different browsers and plugins. It currently supports:

  • flash: Flash 8 persistent storage.
  • gears: Google Gears-based persistent storage.
  • localstorage: HTML5 draft storage.
  • whatwg_db: HTML5 draft database storage.
  • globalstorage: HTML5 draft storage (old spec).
  • ie: Internet Explorer userdata behaviors.
  • cookie: Cookie-based persistent storage.

[+5] [2010-02-16 09:42:54] Sebastien Lorber

Chrome 4 & 5 support localStorage :)

[+4] [2010-06-16 11:17:36] Lloyd

Opera 10.53 supports it.

[+3] [2011-03-11 13:10:20] dimitrisp

Check out the caniuse [1] guide which provides information for future versions as well. It also includes mobile browsers.


[+1] [2011-02-21 15:46:43] Michael Muryn

There is also YUI Storage Lite: It has a good compatibility (IE6+, Firefox 2+, Chrome 4+, Opera 10.5+, Safari 3.1+, etc.) and no browser plugins are required.

[0] [2011-04-30 13:48:44] Geo

You can always check if a browser support this feature with window['openDatabase'] !== null;

More info on:

[0] [2009-07-28 15:13:36] thedz

AFAIK, WebKit supports it.

(3) Some references would be nice. - Ionuț G. Stan
[0] [2009-07-28 18:59:45] olliej

WebKit (as used by Safari and WebKit/gtk at least) supports localStorage, sessionStorage, client-side databases and the application cache. Other WebKit ports (WebKit/qt, WebKit/wx, Chrome, etc) haven't yet turned on support :-(

(1) Is that true of both the mainline and beta line of Chrome? - Nosredna
[0] [2009-08-07 15:48:51] aehlke

The iPhone version of Safari has rather good support for HTML5, including offline storage.

[0] [2011-11-28 20:41:00] Pete Brumm

lawnchair is a newer and more actively supported library.

It provides adapters to enable older browsers and stores json objects

It even has a nice test suite so you can verify support in your browser easily

[-1] [2011-07-16 06:42:21] Bhavesh

Below list gives information on supporting browsers for offline functionality:

  1. IE: Not supported
  2. FF: 3.5+
  3. Safari: 4.0+
  4. Chrome: 5.0+
  5. Opera: 10.6+

Consider adding some references to this answer. - NullUserException