RE: Web Publications via HTML Imports

Sorry again. I’m not talking about the current state of the art—which you’ve done a great job describing. The point is that in a futuristic, hoped for Web Publication implementation the process of “keeping” a Web Publication will (in the future) follow a similar process of aggregation, storage, etc as the prefetch/prerendering processes do now. That was my only point.

Optimizing is a topic we can get to once we’ve got a thing to optimize.

From: Hadrien Gardeur [mailto:hadrien.gardeur@feedbooks.com]
Sent: Tuesday, August 1, 2017 1:04 PM
To: Benjamin Young <byoung@bigbluehat.com>
Cc: Ivan Herman <ivan@w3.org>; Dave Cramer <dauwhe@gmail.com>; W3C Publishing Working Group <public-publ-wg@w3.org>
Subject: Re: Web Publications via HTML Imports

Hello Benjamin,

Using prefetch/preload is not enough for your "keep" use case.

If the resources that you prefetch (most of the time you'll want to use prefetch and not preload) use Cache-Control with specific settings (let's say that the resource is cached for a week), they might work offline.
But if they rely on other cache directives or you force reload the resource, your browser will attempt to revalidate (make a network request) these resources and will eventually fail to display them in an offline context.

To truly store them offline you'll need:

  *   to have a registered Service Worker that will intercept the network request
  *   make sure that you have previously stored in cache these resources (it doesn't have to be the responsability of the Service Worker itself)
  *   and also that a proper network policy is applied (cache first for example) on the URLs that you're working with
In these kind of situations, caching, prefetch/preload, Service Workers and caching all work hand in hand together, but you can't truly replace one with the other.

Best,
Hadrien

Received on Tuesday, 1 August 2017 18:43:25 UTC