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

Re: Service Workers at Work...

From: Ivan Herman <ivan@w3.org>
Date: Mon, 24 Oct 2016 16:37:53 +0200
Cc: W3C Digital Publishing IG <public-digipub-ig@w3.org>
Message-Id: <0EE423B6-9ACE-4436-8D14-1F0470C81F98@w3.org>
To: Hadrien Gardeur <hadrien.gardeur@feedbooks.com>

> On 24 Oct 2016, at 16:17, Hadrien Gardeur <hadrien.gardeur@feedbooks.com> wrote:
> 
> The trick is in
> 
> https://hpbn.co/assets/5e7a4451127bdccbb9346f1c8744c0d9.js <https://hpbn.co/assets/5e7a4451127bdccbb9346f1c8744c0d9.js>
> Well, actually most of the magic is in: https://hpbn.co/service-worker.js <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:38:12 UTC

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