The HTML 5 specification describes an offline application cache that allows you to write web applications that work correctly when your computer or web-enabled device is not connected to the Internet.
To support these offline web applications (and online web applications), the HTML 5 specification provides two new mechanisms for client-side data storage: Key/Value storage and JavaScript database support.
JavaScript database support is available in Safari 3.1 and later, and in iPhone OS 2.0 and later.
Key/value storage is available in Safari 4.0 and later.
Offline application support is available in iPhone OS 2.1 and later and in Safari 4.0 and later
HTML 5 is currently in development by the Web Hypertext Application Technology Working Group (WHATWG) and the World Wide Web Consortium (W3C).
You should read this documentation if you are a web developer who wants to store data locally on a user’s computer in amounts beyond what can reasonably be stored in an HTTP cookie.
This documentation is organized into the following chapters:
“Key-Value Storage”—Describes the new Key/Value storage objects (localStorage
and sessionStorage
).
“Relational Database Basics”—Provides an overview of relational databases and the SQLite dialect of SQL.
“Using the JavaScript Database”—Tells how to use the JavaScript interface to SQLite.
“Database Example: A Simple Text Editor”—Provides an example of how to use SQLite in JavaScript.
For more information about the JavaScript database and key/value storage APIs (including reference material), see the HTML5 web storage specification.
For more information about JavaScript in general, read Apple JavaScript Coding Guidelines and Safari DOM Additions Reference.
Last updated: 2010-01-20