Monday, October 22nd, 2007
WebKit Does HTML5 Client-side Database Storage
>The WebKit team has implemented an implementation of the HTML 5 client side storage API which gives you an asynchronous API:
-
-
-
database.executeSql("SELECT * FROM test", function(result1) {
-
// do something with the results
-
database.executeSql("DROP TABLE test", function(result2) {
-
// do some more stuff
-
alert("My second database query finished executing!");
-
});
-
});
-
Once you have the latest nightly, you can check out their database example and even see the tool that is available in the Web inspector:
Related Content:












Pardon my ignorance but isn’t this a HUGE security risk?
@Maxivida,
According to the writeup (and the HTML5 spec), the databases are under the familiar same-origin policy (like, say, cookies). You probably wouldn’t want to push anything truly sensitive, but I don’t see it as a terrible security risk.
Yeah, you’re not going to be storing unencrypted passwords and credit-card numbers in here, but you shouldn’t be any where. This is an awesome step forward… it will be nice in 10 years when IE has this too.
I had NO idea this was in the HTML 5 spec.
Will we have this feature in Adobe Air as well? It uses WebKit.
plz have some sync queries too!
Oops. I was talking about TrimQuery.
When released this will be 2 major browsers, the planned Firefox 3 release and Apple’s Safari, that implement offline storage. Neato :)
Ok, it’s a further option to solve some very specific problems, like offline sites development. So, why put it into a recommendation of HTML, a technology which is designed to solve GENERAL problems?
Even DOM, our greatest “scripting weapon”, was into a separated recommendation. And i think that a SQL engine isn’t greater than DOM.
The next-generation standards (CSS3, JS2.0, HTML5 / WA 1.0) will be so SLOWLY and INCOMPLETE adopted than their previous versions, if the things continues to go into this way.
Does anyone know if the WebKit bundled w/ Adobe AIR is compatible for this? Can I use this client-side DB with AIR?
@Hudson Tavares: The HTML specification is more like “The Browser API” specification now days. The more things get pulled under the specified standard, the harder it will be for companies to get away with partially implementing the system.
We should be worrying about greater cross platform *cough* Liunx *cough* support for Air before new features are added to it.
@Jon Hartmann: Make a standard bigger can result in unexpected behaviors of browser’s companies. Key-standards, like XHTML and CSS, are huge enough by themselves; looking at nowadays, even CSS 2.0 (a 9-years-old standard) were not completely adopted by the mainstream browsers.
Although a standard need to enclose many aspects than possible, this can weaken it’s objectiveness. A SQL engine doesn’t figure an essencial part to client-side; at this point, putting it into the HTML specification may be a precedent to another “secondary needs”.
@jtrav: Maybe we’ll need to expect until the next beta (or some update). Probably, Adobe will not be so crazy, and update the WebKit version while it’s not enough reliable (“This initial implementation has some things missing from the spec as well as a few known bugs”).
Now, all we need is Mozilla and Microsoft to jump on board and create a panel to develop a standard, It would be a programmer’s dream. But that’s highly doubtful. Oh, just a programmers dream.
Oh yes, and Google should be a part of the panel too. Google is one of the few companies that have fresh ideas, and few people telling them that they can’t do that. Most of the javascript apis from Google are well written and easy to implement. That’s what we need.
I’ve done a little bit of work to hook this into TiddlyWiki. Check it out here:
http://jimpick.com/test/clientside-storage.html
It works with the nightly WebKit builds, as well as the iPhone (and emulator).
Google Chrome version (type about:version into the address bar):Operating System:Error Message:Extensions installed:
Please describe your question/comment in detail (for example, steps to reproduce the problem):
The default web document icon is a blank page, this changed recently not sure if it was with chrome 10 or IE 9, but one or the other.
Changing default browser to IE9 changes the icon to IE9 icon, changing it back to Chrome yields a blank.
sata docking station http://www.espow.com/wholesale-computers-networking-computer-accessories-drive-cases-and-docking.html