HTML5 LocalStorage not persistent on iOS after Power Off

I'm developing a web app for iPad (3G) that requires offline database storage.

At first I tried using HTML5's LocalStorage API. When testing, I learned that if I navigate away from the page and power off the device (both iPad and iPhone), when I reopen the page later, my data cannot be accessed via LocalStorage (database appears to be missing).

I see this behavior at http://diveintohtml5.ep.io/examples/localstorage-halma.html with iOS devices, but Android devices (Droid X and Galaxy) and a PC running WinXP + Safari maintain my data across a restart.

I get appropriate behavior on the iOS devices using Webkit's own "client-side database storage", like what can be seen here: http://blog.darkcrimson.com/2010/05/local-databases/.

Has anyone seen this problem with LocalStorage? Кто-нибудь знает, почему база данных не поддерживается на устройствах iOS? У кого-нибудь есть решение?

7
задан DanBeale 7 October 2011 в 16:44
поделиться