Is it safe to use HTML5 Web SQL Database API? - javascript

After reading http://www.w3.org/TR/webdatabase/ and more specifically:
This document was on the W3C Recommendation track but specification
work has stopped. The specification reached an impasse: all interested
implementors have used the same SQL backend (Sqlite), but we need
multiple independent implementations to proceed along a
standardisation path.
I am wondering if it is "safe" (i.e. ongoing support) to use the HTML5 Database API?

It is strongly inadvisable. It has stopped and is being replaced with the IndexedDB API. Eventually, Web SQL Database will be removed from browsers which currently support it.
You might like to read current browser support figures for Web SQL Database and IndexedDB. Web SQL Database has more browsers which currently support it, but Firefox doesn't support it and outweighs Safari, Opera and assorted mobile browsers, and so it's only at about 28% while IndexedDB is near 36% global support. Also, I believe it is generally believed that Microsoft will support IndexedDB in IE10, while the Web SQL Database API will not be going any further.
Update, 2013-02-04: IE10 does support IndexedDB; Web SQL and IndexedDB are both just under 50% support. IndexedDB spec compliance is also very good which has led to IE10, Firefox and Chrome all now supporting it unprefixed.

No. In bigger, bolder letters is the text,
Beware. This specification is no longer in active maintenance and the
Web Applications Working Group does not intend to maintain it further.

Related

Google chrome sync API?

Is there an API that allows accessing Google Chrome sync data, such as bookmarks, history and opened tabs, by a third-party web application, ideally using only client-side javascript?
Purpose
I am trying to write a self-contained HTML app, that can synchronize reading progress of webcomics across mobile and desktop devices. Ideally, such functionality would be redundant, as bookmarks in theory can fill that purpose. In practice however, especially mobile versions of Chrome lack the means to conveniently update bookmarks, and sorting mechanisms (e.g. sorting by last-modified date). Note that these issues only become apparent when following upwards of 50 webcomics, most of which at that point will only be caught up on very rarely.
Since this is meant as a hobby project, the cost of hosting a webservice or developing for iOS are prohibitive, thus the attempt to reuse existing cloud accounts of the user for synchronization.
Possible discontinued API
Until roughly one or two years ago, the Dolphin and Mercury browsers on iOS allowed synchronizing with Google Chrome directly, by authenticating the app for access to one's Google account. At that time both browsers required that bookmarks were synchronized without an encryption passphrase.
Then suddenly they both dropped this feature, and instead started providing their own synchronization extensions and servers (again, without end-to-end encryption).
So I fear, that Google might have once provided a limited public synchronization API, which was dropped within the last two years; I was however unable to verify even this.
As far as I know they dropped support
We locked down access to chromesync scoped refresh tokens to address a security vulnerability. When we did so, we knew that this may break some 3P browsers which made use of chromesync scoped refresh tokens to leverage Chrome Sync for their users.
Chrome Sync has never officially been supported for 3P browsers. We do not intend to create a solution by which 3P browsers can whitelist themselves or their users so that they can get chromesync scoped refresh tokens. Note that Chromium for Android is technically considered a 3P browser.
Marking as WontFix, accordingly.
https://bugs.chromium.org/p/chromium/issues/detail?id=677887

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/

Javascript client-side what databases are available excluding browser specific ones

Trying to determine what actual non-browser (HTML 5) specific databases that are available for use in JavaScript client-side programing. I do not want to use activeX controls.
If you are looking for a NoSQL-style db on the client you can check out http://www.forerunnerdb.com. It supports the same query language as MongoDB and has a data-binding module if you want your DOM to reflect changes to your data automatically.
It is also open source, is constantly being updated with new features and the community around it is growing rapidly.
Disclaimer, I'm the lead developer of the project.
Initially the W3C created Web SQL, but that is no longer active. The current flavour is the Indexed Database API, which is a stand alone specification but requires support for DOM 3 Events, HTML5, WebIDL and WebWorkers.
Recent browsers should provide some support, however I don't think it's all that complete and certainly not ubiquitous. If you are targetting popular mobile devices or recent desktop browsers, you may be OK.

Can I recognise (graphic tablet) Pen Pressure in Javascript?

Is there any way to recognise pen pressure using javascript.
Preferably I don't want to make any use of Flash and try get this done as pure JS.
EDIT: okay I realised that it is kind of possible for Wacom tablets as they come with software that can work with their javascript api to make it possible (demos). But it's no good for people with Trust tablets or any other brand... So no good really.
Any body know how to do it in C# if not JS?
Yes - if the user has a Wacom tablet installed, then their browser will have a plugin for it that you can access. http://www.wacomeng.com/web/index.html
edit from author: I wrote this a very long time ago. Please see the comments below
Microsoft implemented something called Pointer Events in IE 11. It allows you to access pressure property along with stuff like pen tilt and size of contact geometry.
So far it only works on IE11 (and IE10 with vendor prefixes) but there is a W3C candidate recommendation so maybe it will be standard in future.
Javascript as a programming language in itself has no more ability or lack of ability to read this kind of data than any other language.
The language isn't important. What is important are the APIs available to you from within the language.
Javascript can be run in a number of different environments, some of which may possibly have access to APIs for this kind of hardware. However most Javascript is run in a web browser environment, and this is clearly what you mean.
The web browser environment provides a number of APIs. The most obvious is the DOM, which gives you the ability to manipulate the page, etc. There are other APIs available in the browser as well though. For example, the Geolocation API.
All these are standard APIs which have been defined by the W3C (or in some cases are in the process of being defined by the W3C), meaning that all browsers that support them should make them work the same way.
Unfortunately for you there isn't a standard API for working with pressure pads, so the direct answer to your question is no, it can't be done.
Whether one will become available in the future remains to be seen, but I have my doubts.
There is one way that you can do it though: ActiveX.
ActiveX is an API provided by Microsoft in older versions of IE. It basically provides a way of accessing virtually any Windows DLL code from within the browser.
Since the pressure pen device driver for Windows will be provided as a DLL, this means you should theoretically be able to access it in the browser via an ActiveX control. So therefore yes, you would be able to program it using Javascript.
The bad news, though, is that this is not something I'd recommend. ActiveX as a browser-based technology has long since been abandoned, due to the massive security holes it caused. I don't think the latest versions of IE even support it (I hope not, anyway), which means you'd be forced to use old versions of IE (and only IE - no other browser ever supported it) in order to run your code. Not ideal.
No, that's not possible. Probably not even with Flash.
You can only do so in an Native app. Javascript does not have access to pen pressure information

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

Categories

Resources