What's going on?
I attended a meeting of the Digital Publishing Interest Group recently to provide info on service workers and how they may benefit web implementations of ebook readers. As far as I gathered, the requirements were:
- Works offline
- May be hosted
- May be a single file that can be downloaded and shared
- The single file shouldn't be unzippable by the OS
Well, I had a 13 hour flight, so I decided to do some hacking, and this is it.
How to use it
You're reading one of the publications right now. It's just regular static HTML with a single non-blocking script include. This would be under the control of a publisher, perhaps behind a login system. View the "publisher"'s homepage for other publications.
If your browser supports service workers (such as Google Chrome), you'll see a checkbox at the top of this page to make the publication work offline, and a link to download an archived format of the publication.
There's a seperate e-book reader site which allows you to view the single-file publication archives. In reality it would sit on a different origin.
Browsers that don't support service worker can still view publications, but they don't work offline & can't be downloaded as an archive.
The e-book reader site requires a service worker capable browser.
Continue to page 2 for a list of features and how the service worker was used.