Page 1 of 1

Offline database with images

Posted: Tue Jun 26, 2012 11:38 pm
by elan

I am beginning to work on a quiz app with content currently stored in a MySQL database, as well as images related to some of the questions, currently stored on a filesystem and referenced by the database. The app will be handling up to 20MB of data, including text and images. The app must be usable offline.

I haven't been able to find a plugin to support this. Does Tiggzi provide a facility for storing and referencing such data offline? Can you please point me in the right direction? My goal is to target the three major mobile platforms.

Thanks!


Offline database with images

Posted: Wed Jun 27, 2012 3:38 am
by maxkatz

In Tiggzi you build standard HTML5 mobile apps and can also create native apps via Cordova (PhoneGap).

There are a couple of options for storage:

1) Browser local storage. It's basic and only stores key/value pairs. I think there is a list of 5Mb, which could be increased but probably depends on browser and OS. Supported by all browsers. https://developer.mozilla.org/en/DOM/...

2) Web SQLite. A real database in the browser, supported by a number of browser but is no longer an active specification: http://www.w3.org/TR/webdatabase/

3) A new specification is IndexedDB. It's also a real database. Check browser support. http://www.w3.org/TR/IndexedDB/


Offline database with images

Posted: Sun Jul 01, 2012 5:06 pm
by elan

Thanks for the pointers. After some more research, I've decided to add the images statically to the project and use Javascript arrays in place of the database. Since this is for a quiz app, I have no SQL or even search requirement for the content. Does this make sense to you?


Offline database with images

Posted: Sun Jul 01, 2012 7:23 pm
by maxkatz

Yes, seems like a good option.