Firefox 3.5 support for client-side databases? - javascript

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 e.g. 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.

Related

Universal solution to save more than 5 MB data offline, which support all Browsers and PhoneGap application?

I developed a game in web technology that store the data in LocalStorage. But it is giving DOM Quota Exceed Error after Local Storage is getting full. I am looking for a universal solution which supports all browsers and PhoneGap application. I can not use FileAPI because IE and safari does not support it. Not IndexDB because, Safari doesn't support IndexedDB. Not Sqlite because, Firefox and IE does not support it. Please help.
According to this safari does partially support IndexedDB: http://caniuse.com/#search=indexed
Anyway, if it doesn't suite your needs, why not use different storages depending on the browser? You can use IndexedDB in all but Safari, and use WebSQL in Safari :-). You can use something like this to polyfill it without impact: http://nparashuram.com/IndexedDBShim/

Alternative to IndexedDB in not supported browsers? Safari/iOS Saf-Chrome

I have a working sample with IndexedDB that works perfect for my Desktop Chrome. Nevertheless, my main aim is to develop for iOS devices (Chrome-Safari) and this API isn't available there yet.
What should I do?
I have seen this Polyfill: http://nparashuram.com/IndexedDBShim/. But, I tested it with my iPod Touch 5th Gen and somehow the 19th test doesn't work...
Should I use WebSQL which was deprecated?
I liked the idea of the Polyfill but that it not working for me...
Are there any plans to support IndexedDB in the future for all the non-supported browsers?
Thanks!
Here is another similar polyfill you can try, but in my (albeit limited) experience, both polyfills are buggy/incomplete. They both also have many open issues on GitHub of people reporting problems. And when I tested one of them (I forget which one) it was significantly slower than native IndexedDB.
Maybe it's possible to create a decent polyfill, but the current ones don't seem to be doing the job.
Should I use WebSQL which was deprecated?
The problem with WebSQL is that it's never going to be supported in IE or Firefox. You could probably get away with WebSQL if you're only targeting mobile browsers, at least until Firefox OS or Windows Phone grabs significant market share.
Are there any plans to support IndexedDB in the future for all the non-supported browsers?
Let's be clear. You're asking about Apple, since everyone else supports IndexedDB in their latest browser (iOS Chrome uses Apple's rendering engine because Apple won't let them do anything else).
Not only does Apple not support IndexedDB, they haven't publicly said anything about it (as far as I can tell... and I have done a fair amount of searching). Which seems pretty weird. So as best I can tell, nobody has any idea if Apple ever plans to support IndexedDB. The conspiracy theorist in me thinks maybe they're trying to sabotage HTML5 apps to force people to write native apps, but that's purely speculation.
In total, this leaves us developers in a pretty shitty situation. There is no good cross-platform solution. I recommend you complain to Apple about it. That's what I've done, and I've asked my users who want to use my IndexedDB-based app on iOS to do the same. Still no word from Apple.
UPDATE - Indexeddb is now supported in iOS 8 as stated in WWDC 2014 - but unfortunately it's broken pretty badly.
Looks like IndexedDB is not working as web app (pinned to the home screen).
Works inside Safari.
IndexedDB was never be made to be directly used by developers. It is more like an API that can be used to build a "real" database on top of it.
Nowadays there are many alternatives that you could use instead.
NeDB used heavily, but deprecated
PouchDB
RxDB
If you still need to use IndexedDB, at least I would recommend to use a wrapper like dexie.js which at least makes it easier.

How to check the last available version of Chrome and Firefox using C# or JavaScript?

One of the requirements of one of my clients is to show a message to a user that's using an older version of Firefox, Chrome, IE or Safari. For the last two it's easy (IE 9+ and Safari 5+). But for Firefox and Chrome, the requirement is that the site supports the current and the previous version of each browser.
To get the clients browser and version is quite simple, but I need to know what is the last version of each browser. Is there any way of doing that?
Well, technically, all you need is a place that keeps track of what the latest version of each browser (Ideally with a web service).
A quick Googling I was able to find: http://www.webdevelopersnotes.com/articles/latest-browser-versions.php
It's not a web service, but you could simply parse that HTML and get the latest version of each browser. Alternatively, you could keep track yourself and manually update this information in your database.
You should only ever have to worry about IE when it comes to version enforcement. Exception being, of course, if you need a specific API that's just not available in previous versions of Chrome/Firefox, but in that case you'd look and enforce the API, not the browser version. Adding to that, if Chrome/Firefox don't have an API, chances are even the most bleeding edge version of IE won't either, so the point is moot. The fact is Firefox and Chrome, and in part Safari, are far ahead of IE when it comes to browser hosted capabilities that trying to enforce specific versions of the former would likely be a lot of wasted time and effort to yield nothing substantial.
The best I could find was this. It has an export option that allows to export in JSON, XML...
I would strongly suggest that you don't check the browser version, instead try doing feature detection using, say, Modernizr.
What features of your client's site depends on specific versions of each browser? If you use Modernizr you could perform a check on a feature, say some video stuff, and if the current browser does not support that feature, then display a message to the user suggesting they upgrade their browser.
Detecting browser versions via Javascript is very flakey at best.
The only reason I'd say you need this kind of verification is because your webpage has features only available to latest browsers. Instead of relying on version numbers, I suggest learning Modernizr.js for your website.
http://modernizr.com/
It can detect particular html5/css3 features individually.

Spine.js IE6 Support

So I've been looking at Spine.js recently as an alternative to Backbone. However, in the documentation is states:
Works in all major browsers (Chrome, Safari, Firefox, IE >= 7)
then in the comments on this page some one says:
Spine doesn't seem to run in IE6 or IE7... Maybe even other Internet
Explorers. Shouldn't this be pointed out? Backbone runs fine with
these. Am I just missing something?
reply:
Maybe because of json? "If you're using an older browser which doesn't
have native JSON support (i.e. IE 7), you'll need to include json2.js
which adds legacy support." (from the docs)
This is literally ALL the information i could find on the subject. Does anyone know if ie6 is at all supported? If not I'm afraid I will not be able to use it...
I can confirm that spine.js works on IE7 - we don't have IE6 as a requirement nor any IE6 tests machines, so I can't comment on IE6 support.
I would suggest running a quick test, using it takes under an hour to get a simple app running that you can verify things on.

What is the status of HTML 5 File API today in differnt browsers?

I am currently working on the File API. After initial investigation found that the Chrome, Firefox (new versions ) have good support for this. However IE, Opera have not implemented it and Safari have partial support for this.
Can some one please let me know
Do opera and IE support the File API ? Is it in plan for future release?
Safari says to have partially implemented the File API. How much this partial this is implemented ? Have they implemented XHRHttpRequest.send(File) method ? So that we can send the file object to server.
My understanding is that the Chrome and Firefox are only two browsers today to have support for the drag drop file to web browsers feature. I that right ?
Yes, File API successfully implemented in WebKit browsers as of today.In Gecko it is partially implemented and for other browser it is not implemented yet. You can check detail in "Comparison of layout engines (HTML5)".
Here is all the gory details in an "easy" to digest way. Well nothing about HTML5 support is really easy, but this is the best source for version information:
http://caniuse.com/fileapi
For status on File API and any other HTML5 API's keep a tab on HTML5 Readiness

Categories

Resources