Daniel Harrison's Personal Blog

Personal blog for daniel harrison

IPad and html5 localStorage, Playing with rich html clients on the ipad. June 3, 2010

Filed under: Uncategorized — danielharrison @ 6:28 am
Tags:

Got my iPad yesterday and starting playing with the project I’m working on and mobile safari. Disappointingly LocalStorage in mobile safari on the iPad appears to behave differentially than the desktop version of webkit. I started getting errors,  keys not being found and quota exceptions at quite low volumes of data.

The developer tools are good though (Settings > Safari > Developer) however unlike the desktop version don’t allow you to see localStorage databases which makes resetting, editing and debugging harder.

In the meantime I’ve done a quick KVP style local sql database with an abstracted API for my web client. Lost me half a day or so. Also interesting to see the mail web client from google is using this style of database as well. With mozilla’s stance against web database it just means a multi platform implementation of local storage is still a pipe dream.   My pet peeve around API’s inconsistent capitalisation is evident in the sql API as well, particularly a problem in javascript, eg element.innerHTML vs transaction.executeSql.

Following mozilla’s response to webdatabases with their (in my view a better approach) indexedDB it will be interesting to see what finally is adopted by WHAT-WG and the W3C and then makes it’s way back into webkit.  Sadly this seems medium term future and with iPhone OS 4 shipping soonish it will mean 2 competing implementations with slightly different semantics for a while.

One of the most frustrating things with LocalStorage is lack of control over size and partitioning of data and named storage which I think both webDatabase and indexedDB address. IndexedDB seems to be a nice, easy to understand compromise that to me feels more javascript idiomatic with all of the necessary bells and whistles.

Advertisements
 

2 Responses to “IPad and html5 localStorage, Playing with rich html clients on the ipad.”

  1. Note that IndexedDB is not just a Mozilla thing. We are working with Google and Microsoft on the specification.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s