[whatwg] Offline Web Apps

Dave Camp dave.camp at gmail.com
Fri Sep 21 10:49:59 PDT 2007

On 9/21/07, Robert O'Callahan <robert at ocallahan.org> wrote:
> Actually we have an experimental API for this now. See here:
> http://mxr.mozilla.org/seamonkey/source/dom/public/idl/html/nsIDOMNSHTMLInputElement.idl#55
> http://mxr.mozilla.org/seamonkey/source/content/base/public/nsIDOMFileList.idl
> http://mxr.mozilla.org/seamonkey/source/content/base/public/nsIDOMFile.idl
> The core is:
>  readonly attribute DOMString fileName;
>  readonly attribute unsigned long long fileSize;
>  DOMString getAsText(in DOMString encoding);
>  // raises(FileException) on retrieval
>  DOMString getAsDataURL();
>  // raises(FileException) on retrieval
>  DOMString getAsBinary();
>  // raises(FileException) on retrieval
> These should be self-explanatory.
> I guess this isn't great for really huge files, but multi-megabyte files
> should be OK on most machines, and it avoids having to deal with a
> client-writable "cache". It obviously has some interesting uses for online
> apps as well.

It'd be possible to extend this to avoid bringing these files into
memory.  We'd just need globalStorage (or something like it) to
accept/return nsIDOMFile objects, and a way for XHR to send them.


More information about the whatwg mailing list