W3C home > Mailing lists > Public > public-publ-wg@w3.org > August 2017

Re: Web Publications via HTML Imports

From: Hadrien Gardeur <hadrien.gardeur@feedbooks.com>
Date: Tue, 1 Aug 2017 19:03:44 +0200
Message-ID: <CA+KS-10=ZGj9uBkYXQsoHjwd1K4_Z5+Kdau2tG0EJ099SOh4fg@mail.gmail.com>
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>
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

To truly store them offline you'll need:

   - to have a registered Service Worker that will intercept the network
   - 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.

Received on Tuesday, 1 August 2017 17:04:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:52:16 UTC