W3C home > Mailing lists > Public > public-digipub-ig@w3.org > October 2016

Re: Service Workers at Work...

From: Daniel Weck <daniel.weck@gmail.com>
Date: Mon, 24 Oct 2016 15:41:38 +0100
Message-ID: <CA+FkZ9FV_cmpsACWkjFM9ewYdtyETGgPH2AMHyQJpt1en0SgWg@mail.gmail.com>
To: Herman Ivan <ivan@w3.org>
Cc: "DPUB mailing list (public-digipub-ig@w3.org)" <public-digipub-ig@w3.org>, Hadrien Gardeur <hadrien.gardeur@feedbooks.com>
Google's SW-toolbox has limitations, but it's very handy nonetheless.
dan

On 24 Oct 2016 3:39 pm, "Ivan Herman" <ivan@w3.org> wrote:

>
> On 24 Oct 2016, at 16:17, Hadrien Gardeur <hadrien.gardeur@feedbooks.com>
> wrote:
>
> The trick is in
>>
>> https://hpbn.co/assets/5e7a4451127bdccbb9346f1c8744c0d9.js
>>
>
> Well, actually most of the magic is in: https://hpbn.co/service-worker.js
> This is based on sw-toolbox which is pretty convenient when you don't want
> to write your SW yourself.
>
> Basically there are only two lines for the configuration, the rest is the
> code for sw-toolbox itself:
>
>
> <snip>long line, essentially the table of content I guess</snip>
>
>
> var cacheName = 'sw-precache-v2-hpbn-' + (self.registration ? self.registration.scope : '');
>
> Good to know it is that simple!
>
> Ivan
>
> ----
> Ivan Herman, W3C
> Digital Publishing Technical Lead
> Home: http://www.w3.org/People/Ivan/
> mobile: +31-641044153
> ORCID ID: http://orcid.org/0000-0003-0782-2704
>
>
>
>
>
Received on Monday, 24 October 2016 14:42:09 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 25 April 2017 10:44:46 UTC