Links for data/file loading, caching and saving with JavaScript

There are some really useful technologies already available to the JavaScript programmer and others on the way that will enable JavaScript to do more useful tasks than have previously been possible.

The first task in the implementation of these new methods is to navigate the documentation and to understand which parts are live and ongoing and which parts are deprecated or set to become obsolete.

For example, while you can start work with Local Storage, Session Storage, the Offline Application Cache and the File API today, if you are going to be working with a database then you have some more difficult choices, especially if you are looking for cross-browser compatibility.

There's also the question of how far into the future you wish to look. If you are specifically working to support the Chrome (or Opera) browser and the associated eco-system then the FileSystem API will be useful to you, but if you're looking to build something that works everywhere then it's too early to implement this API on the web.

Notes: You need to keep a careful eye on browser support (the Mozilla site is good for this!) and, if you adopt an up-to-the-minute standard for the open web, factor in ways to gracefully degrade the experience. If you are supporting older browsers, i.e. pre-IE8, pre-Safari 5, pre-Chrome 5, pre-Firefox 3.5, pre-Opera 10.5, even local and session storage options become unavailable to all of your users.

Local Storage and Session Storage

DOM Storage Guide (Mozilla)

Notes: Good support. Well documented across the web and easy to use.

Offline Application Cache

HTML5 Offline Application Cache (Safari, Apple)

Using the Application Cache (Mozilla)

Notes: Good support. Relies on the use of a manifest file.

File API

File API (W3C)

Consists of the following parts:

Notes: BlobBuilder is deprecated, use Blob instead. Good support.

IndexedDB

IndexedDB (Mozilla)

Note: Not currently supported by Safari.

WebSQL Database


Note: Not supported by Firefox or IE (Mozilla tells us it is "deprecated since November 18, 2010").

FileSystem API


Note: This is an experimental technology currently supported by Chrome and Opera.

Further Reading

Guide to Web APIs (Mozilla)

WebWorkers (Mozilla)

HTML5 Features: Storage (HTML5 Rocks) - breakdown of which browsers support WebStorage, IndexedDB and Web SQL

Unzipping Files (StackOverflow) and Read a Zip file with JavaScript (demo)

Endorse on Coderwall

Comments