[sword-devel] HTML5 File API and SWORD modules

Matěj Cepl mcepl at redhat.com
Tue Jul 31 01:07:53 MST 2012

On 31/07/12 09:08, Stephan wrote:
> I'm thinking about to build a HTML5 frontend that works offline in a
> browser. I know that there were some discussions before about this
> topic, but I want to know if it is possible to read the sword modules
> with the HTML5 File API (http://www.w3.org/TR/FileAPI/)?

FileAPI reads from local storage (it is still covered by cross-origin 
You mean FileReader and XMLHttp, right? See 
http://hacks.mozilla.org/2012/02/saving-images-and-files-in-localstorage/ for 
an exaplanation.

> Converting the modules to JSON format may be also an option, although
> there is the 2.5/5MB size limit for localStorage / IndexDB, but it would
> be easier to read such files.

OTOH, it is apparently possible to store files (as type blob or file) in 
IndexedDB without conversion to JSON 
http://hacks.mozilla.org/2012/02/storing-images-and-files-in-indexeddb/), which 
stores files locally (outside of JSON storage) and should have virtually 
no limits on size.

Also series on http://www.nczonline.net/blog/tag/file-api/

> I already build an SWORD NPAPI plugin (32bit, linux only,
> http://www.mail-archive.com/sword-devel@crosswire.org/msg24393.html) to
> get my Bible App working in Chrome/Chromium, but I'm looking for a full
> offline web app and not a hybrid solution.

If you have anything to test, I am willing to help you to test it with 
Firefox (I am using Nightly/Aurora branch, so we should be pretty close 
in terms of capabilities) so that we don't have yet another proprietary 
Chrome-only website.



http://www.ceplovi.cz/matej/, Jabber: mcepl<at>ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC

Home is where ~/.bashrc is.
    -- from Usenet

More information about the sword-devel mailing list