DPUB IG Telco, 2016-11-14: Service Workers in action 2.

Author(s) and publish date

By:
Published:

See minutes online for a more detailed record of the discussions.

Service Workers in action 2.

(Followup of last minute’s meeting on the usage of service workers.)

Hadrien Gardeur made a presentation of the proof-of-concept work he has done.

First of all, Hadrien has defined a version of manifest using JSON-LD; this work was done, originally, as part of the EPUB3.1 Working Group at IDPF, under the heading of “browser friendly manifestation”, together with Dave Cramer. It contains the various data that EPUB3.1 has in the OPF file (spine; further resources; “links”, i.e., various type of metadata). The manifest file can also refer to a separate Web App Manifest. A manifest can be discovered through direct access, through an HTML link element, or via an HTTP header. The various prototypes he has built make use of this manifest format.

One prototype is a “Web Publication JS” (or “Progressive Enhancement”, see a specific book) is some sort of a Web Publication that carries a specific JS code using Service Workers, and also links to the manifest files. The code injects some navigation signs into the content and displays it in the browser.

The other prototype is a “Web Publication Viewer” (a live demo is also available) which is more kind of a “reading system” that uses its own Service Worker based JS code and displays the content of a book in an iFrame.

Subsequent discussions included:

  • The mutual relationships of the Publication and the Web App Manifests. Hadrien's approach separates these two, whereas the presentation last week essentially built “on top of” a Web App Manifest via extensions. It is not clear at this moment which approach is better, but it was agreed that a feedback on the current problems should be provided to the Web App Manifest spec developers.
  • Problems around the usage of Service Worker in the second, “Web Publication Viewer” case. The problem is the strict separation of the iFrame context, which makes it difficult to properly implement the situation when one chapter has a direct link to another chapter; that operation happens within the iFrame, i.e., the cache control on the top level browser has no information about it. (Note that Daniel Weck referred to a separate discussion thread that shows that this is an active issue for developers). Again, feedback to the Service Worker spec developers would be a good idea.

Related RSS feed

Comments (0)

Comments for this post are closed.