Web SQL Database

Of all the exciting features of HTML5, the one that rocks my world the most is the Web SQL Database. The Web SQL Database spec gives developers a simple but powerful JavaScript database API to store persistent data in a local SQLite database.

H http://jonathanstark.co... P

Figure 5-1. Before the refreshEntries() function, the title just says "Date"...

H http://jonathanstark.co... P

Figure 5-2. ...and after the refreshEntries() function, the title reflects the selected date

Technically, the Web SQL Database spec is not part of HTML5. It was broken out of the original HTML5 spec into its own spec, but in casual conversation it's often still referred to as an "HTML5 feature."

Developers can use standard SQL statements to create tables and to insert, update, select, and delete rows. The JavaScript database API even supports transactions. We're talking about SQL here, so there is an inherent complexity. Regardless, this is a game-changing feature, so time spent getting your head around it will be well rewarded.

0 0

Post a comment