=

desalasworks presents:

a selection of works by steven de salas

HTML5 Databases on iPhone

A tiny Javascript SQLite Client using the lastest W3C standards for offline storage.

I’ve just written this neat SQL Client using Javascript and SQLite.

HTML5 SQL Client running on iPhone

Since the iPhone browser is based on Webkit, which supports the latest W3C standards, its possible to create a SQL Client simply using Javascript.

The SQLite database is hosted by the browser process this means that it runs even when disconnected from the internet.

The following browsers are currently supporting HTML5 standards for database storage:

  • Google Chrome
  • Safari
  • Opera

To access this SQL Client on your own iPhone:

  1. Open up Safari
  2. Type html5db.desalasworks.com into the location bar
  3. Press “Go”. Thats it!

Otherwise you can also open it in your desktop browser by clicking the link above.

Update January 2016 – WebSQLDump: Are you looking to export an existing WebSQL database?

This project has spawned a separate library to extract the contents of a WebSQL database hosted on the client.

https://github.com/sdesalas/websqldump

The syntax is as follows:

websqldump.export({database: 'NorthwindLite'});

Comments

4 comments

  1. A Visitor says:

    05 Dec 2010 00:17:26 – I Like This!

  2. Plnodi says:

    In W3C Working Group Note 18 November 2010 says that:
    Beware. This specification is no longer in active maintenance and the Web Applications Working Group does not intend to maintain it further.
    Web Sql database is DEAD???????
    Tell me your opinion
    Thank
    plnodi

  3. steven says:

    Hi Plnodi,

    The way I read the big warning is that the W3C working group got sick of telling browser vendors who had implemented this (Chrome, Safari, Opera) to stop using SqlLite (keep reading further down the page to the red box) so they decided to “pout their lips” and “cross their arms” with a big yellow sign on their page instead.

    WebSql is proliferating rapidly with increased use of mobile devices, almost all of which are supporting HTML5 standards. I dont think its dead at all, its just the same old tale we’ve always had: W3C want to do things one way, and the browser manufacturers are not paying any attention to their recommendations.

  4. Stan says:

    IndexDB is terrible. Just try doing a few inner joins and you’ll see what i mean.

    WebSql is the way to go.

Leave a Reply

(Spamcheck Enabled)