Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 6. Data > HTML 5 Storage

6.3. HTML 5 Storage

Clearly, the Cookie and Depot objects are simplistic, and while attractive for casual data storage and caching, they won’t fulfill the need for formal database support. To address that need, Palm webOS includes support for the HTML 5 Database object to create, update, and query an SQL database. Like the Depot, the HTML 5 database interfaces are asynchronous, requiring you to use callbacks for much of your database handling.

Creating Large Databases

By default, Palm webOS stores databases within a size-constrained local file store, which is the reason that HTML 5 databases are restricted to a 1MB maximum. The bulk of the storage on the Palm Prē is in the mass storage partition or USB accessible storage, reserved for media use.

You can store your HTML 5 database or Depot in the mass storage partition, where it is not subject to a maximum size other than by the amount of available memory. To do that, specify the database name with a prefix, as in:

openDatabase( "ext:mydbname", ... );

The “ext:” will be mapped by the system to the mass media partition on the Palm Prē and an appropriate mapping on future devices.



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial