简体   繁体   中英

Firefox 3.5 support for client-side databases?

I was originally looking for a basic tutorial on how to get started using client-side databases in FF3.5. My understanding was that this feature is support in FF, Safari, and IE8. However, I'm running into a pretty basic problem, which is that the syntax to created such a database doesn't seem to be found in FF3.5.

For example, to create a new db:

  var database = window.openDatabase("Database Name", "Database Version");

However, in FF3.5 window.openDatabase is not found. It is found in Safari 4 using that syntax. I haven't tested IE8 so I don't know about that.

Does someone have some more information about this?

You may be thinking of localStorage and sessionStorage, which are part of the W3C Web Storage API.

IE8 and Fx 3.5 support the above properties. Check the vendor documentation ( developer.mozilla.org for Firefox ).

Firefox doesn't support the real DB yet ( tracking bug ) and it's not clear that the current proposal (just make sqlite available to web pages) is the right one or the one that will be implemented in all browsers (see eg this post from Vlad Vukićević, a Mozilla developer)

My understanding was that this feature is support in FF, Safari, and IE8

Nope, it's only in WebKit (Safari/Chrome), and also via Gears.

You may be thinking of the simpler Local/Session Storage feature, which just stores unstructured data. This is supported by Firefox 3.5, IE8 and Safari, but not Chrome.

I think you are talking about this W3C's WebSimpleDB. However I don't know how mature or widely supported it is.

If you are looking to store data in the client there is also http://taffydb.com/ which is a simple JavaScript DB that lives in the browser.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM