Firefox 3.5 support for client-side databases?

Initially, I was looking for a basic tutorial on how to get started with client-side databases in FF3.5. I realized that this feature is supported in FF, Safari and IE8. However, I ran into a rather simple problem, which is that the syntax for creating such a database does not 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 was not found. It is in Safari 4 using this syntax. I have not tested IE8, so I do not know about it.

Does anyone have more info on this?

+6
javascript database firefox client
source share
3 answers

You might 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 does not yet support a real DB ( tracking error ), and it is not clear that the current proposal (just make sqlite available for a web page) is correct or the one that will be implemented in all browsers (see, for example, this post from Vlad Vukichevich , Mozilla Developer)

+4
source share

I realized that this feature is support in FF, Safari and IE8

No, this is only in WebKit (Safari / Chrome), as well as through Gears.

You might be thinking of a simpler Local / Session Storage function that simply stores unstructured data. This is supported by Firefox 3.5, IE8 and Safari, but not Chrome.

0
source share

I think you are talking about this W3C WebSimpleDB. However, I do not know how mature or widely supported it is.

If you want to store data on the client, there is also http://taffydb.com/ , which is a simple JavaScript code that lives in a browser.

0
source share

All Articles