TechChee.com, shop online for gadget, gizmo and hot tech stuff

Gadget vista, shop & buy online, gadget online store, corporate gift, software, web 2.0 and tech news

 





Add to Technorati Favorites



WebKit has JavaScript API for client-side database storage


October 30th, 2007 by ketyung

WebKit has JavaScript API for client-side database storage
WebKit has got some cool asynchronous API that follows one of the specs of the HTML 5 i.e. allows you to write JavaScript code to store data, using SQL statements that you’ve been familiar with, so data can be stored on the client’s computer. This should work more or less similar to one of the features that the Google Gears offer - the Local Database API. This would be useful for those applications that wanna store more information on the client sides, a much better way and easier to manipulate by using SQL statements instead of nasty cookies. More info and code after the jump!


Some usage of Javascript code of Webkit’s API is as follows:

var database = openDatabase(”Database Name”, “Database Version”);

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!”);
});
});

via  More on Webkit blog

JavaScript,JavaScript API,Javascript client-side database storageWebKit API[/tag],API

Technorati Tags: , , ,

Bookmark with:

[Delicious]    [Digg]    [Reddit]    [Facebook]    [StumbleUpon]

Leave a Reply