October 30th, 2007 by ketyung

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:
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!”);
});
});
JavaScript,JavaScript API,Javascript client-side database storageWebKit API[/tag],API
Technorati Tags: JavaScript, JavaScript API, Javascript client-side database storage, API

















Leave a Reply