I would like to write an html/javascript/sql app for personal use only running locally (not for downloading over the internet) which would interact with a large local database (about 3MB) and display images and text drawn from a very large pool of resources stored locally (about 2GB).
I already have such an app written in Java for Android, but am interested in re-developing it so that it would be capable of being run on different platforms (iOS, etc),if possible.
My immediate question is: is it possible for an “offline web application” to access a pre-existing locally stored database and to read locally stored resources? Information that I have found so far on the web talks about cached data which doesn’t sound like the same thing.
I believe you can simply develop a HTML file that will run locally on your device (be it a PC, mobile, or whatever).
You could then take advantage of the HTML5 WebDatabases for your database needs – this should work in any modern browser and runs client-side.
Regarding your photos, I would store them in a subfolder of your HTML file. This way, you can show them within your webbrowser using regular image tags like:
To pre-populate, or transition, from a SQLite database you can take a look at this sample code: https://github.com/atkinson/phonegap-prepopulate-db
It utilizes a dump of the SQLite database and the FileReader of HTML5 to iterate over the data and insert it into the browser-based WebDatabases or Web SQL database.