Tuesday, February 3rd, 2009

HTML5 Features in latest iPhone; Application Cache and Database

Category: Database, HTML, iPhone, Mobile, Standards

Brad Neuberg told me about two cool additions to the iPhone that now use HTML5 features:

Safari JavaScript Database Programming

The HTML 5 specification provides a new mechanism for client-side data storage: JavaScript database support. HTML 5 is currently in development by the Web Hypertext Application Technology Working Group (WHATWG).

JavaScript database support is available in Safari 3.1 and later, and in iPhone OS 2.0 and later.

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.

HTML5 Application Cache

Michael Nordman of Google asked “Is this stuff built into shipping Safari or iPhone browsers yet?”

David Kilzer replied “This feature shipped with iPhone OS 2.1. When you use “Add to Home Screen” from the “+” button on Safari for iPhone, a web application with a manifest defined (per the HTML5 spec) will be saved with any cached resources. Note that the manifest file *must* be served with the correct MIME type for this to work.

There is no shipping version of Safari for Mac OS X or Windows that supports this feature yet.”

Fantastic to see!

Posted by Dion Almaer at 12:31 am

3.9 rating from 25 votes


Comments feed TrackBack URI

This is exactly the kind of shit I’ve been asking around for months. Yet no one seems to know!

Comment by Jordan1 — February 3, 2009

Which browsers have SQLite storage now?

Comment by Nosredna — February 3, 2009

Nosredna, every browser via Google Gears plugin but I personally prefer the WHATWG way (so I guess a Gears wrapper to let it behaves as HTML 5 database engine is a good idea? I do not remember if somebody has already done it …)

Comment by WebReflection — February 3, 2009

@WR, I think I’ve seen higher-level storage APIs that use whatever’s around. I’m using SQLite in AIR and love it.

Comment by Nosredna — February 3, 2009

Here’s something you can use:

Comment by JavaScriptr — February 3, 2009

The application cache is a very exciting development as it makes it possible to essentially “install” web apps on the phone. yay!

The next version of SproutCore’s build tools will actually automatically generate an HTML5 ApplicationCache manifest so SC apps will just install like magic. :-)

Comment by charlesjolley — February 3, 2009

Looks like Google is playing with Ajax for iPhone. Nice UI, nice Ajax and the best part: seems to work offline! Maybe they are using this feature from HTML5?

Comment by dt — February 4, 2009

Leave a comment

You must be logged in to post a comment.