views:

13632

answers:

7

Essentially, I wanted to run a piece of demo code from W3c Offline Webapps 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'?

A: 

AFAIK, WebKit supports it.

thedz
Some references would be nice.
Ionuț G. Stan
+8  A: 

I believe Safari 3.1 supports openDatabase.

You should check out the PersistJS 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.
Ambirex
+68  A: 

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

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

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

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

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

IE6, IE7: userData persistence, 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, which is built into earlier versions of Chrome and thus doesn’t require a separate install.

brianng
+1 for a good answer with many sources.
statenjason
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
A: 

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 :-(

olliej
Is that true of both the mainline and beta line of Chrome?
Nosredna
A: 

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

Wahnfrieden
+3  A: 

Chrome 4 & 5 support localStorage :)

Sebastien Lorber
+2  A: 

Opera 10.53 supports it.

Lloyd