In association with heise online

13 January 2011, 17:26

Firefox 4 adds IndexedDB

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

Firefox Logo The specification is not yet signed off, but the Firefox development team has nonetheless elected to integrate an IndexedDB API into the next version of its browser. It will make its first appearance in the ninth beta version, out shortly.

Whether and how browsers should store data locally has long been a popular topic of conversation whenever two web developers meet. All web browsers now have implementations of the web storage model. That model is, however, only designed to store small volumes of data. The W3C’s proposed alternative, WebSQL, has not found widespread take up – partly because it is tied to using the open source SQLite as its local database. The W3C stopped work on WebSQL in November.

IndexedDB is on the one hand simple to use, in that it foregoes SQL and offers merely a simple key-value store. On the other hand, it has some ease of use features in the form of indices, automatically generated keys and transactions. The IndexedDB database is able to hold JavaScript objects and data types such as numbers and strings. Applications can communicate with the database synchronously or asynchronously – in the latter case event handlers are required to process events generated by the database.

The Firefox implementation does not yet conform fully to the current version of the standard. It is currently missing synchronous functions and conversely includes a getAll() method which is not in the standard. The central object is currently called mozIndexedDB rather than IndexedDB, as specified in the W3C document. The prefix is intended to emphasise that it is not a standard implementation.

Microsoft recently published its own reference implementation of IndexedDB in its HTML5 play area.

See also:

(crve)

Print Version | Send by email | Permalink: http://h-online.com/-1169261
 


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit