looking over the dojo implementation, it seemed as though Brad had already done most of the work i was working on as well. the only downside i had at that time was that my current client's project was implemented using Ext, not dojo. instead of having to include the entire dojo framework along with the Ext framework, i decided that my offline library could be used as a nice, small, library-independent add-on. i polished it up and now it is what you see here.
vortex.offline.init("My Application Name");
that's it! behind the scenes, the code will scan the page to find all of the resources required (including images, css, other .js file, etc) and cache them using the Gears LocalServer object. the library exposes several events that you can hook into, such as when the network status changes. there is also a syncing system that lets you record actions while offline and replay them back when the network is connected again.
the library also contains a generic storage module that can be used independently of the offline module (although it is still obviously dependent on Gears behind the scenes). objects can be easily saved and retrieved using commands like:
under the covers, the objects are serialzied to json and stored in the local Gears database.
the debug version of the vortex_offline.js file included in the .zip is fully commented and shows the additional methods available for both modules. the minified version weighs in at just under 10k, including the json parser that you can swap out if you are already using another one. a sample application will be posted up shortly...
[download .zip file]