HTML5 Local Databases

Starting with Safari 4, iPhone/iPad OS3, Chrome 5, and Opera 10.5 (Desktop), HTML5 Local Databases are now supported. Darkcrimson is sharing tutorial and the basic examples how to get started with HTML5 Local Database. html5 database HTML5 Local Databases First we check if the browser supports the openDatabase method, is so we continue and define the database parameters:

  • shortName is the DB name as it will be referred to by the browser and SQL
  • version openDatabase version. 1.0 for this (more on that here)
  • displayName The full display name / description of the database
  • maxSize This is max size in bytes is the size you expect the database to reach. This is essential for memory management purposes.

Next, we call the createTables(); function where the table is defined and pre-populated with initial data (optional).

Demo: http://blog.darkcrimson.com/samples/localdb
Website: http://blog.darkcrimson.com/2010/05/local-databases

Incoming search terms for the article:

Related Posts

The Benefits of Using HTML5 in Web Development

Are You Human Captchas: Ending Your Captcha Agony

Inpage Editing For CMS Using Create.js

Creating a Beautiful CSS3 Image Gallery with Dynamic Fading Caption Text