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

Re: Service Workers at Work...

From: Hadrien Gardeur <hadrien.gardeur@feedbooks.com>
Date: Mon, 24 Oct 2016 16:17:52 +0200
Message-ID: <CA+KS-13OgNjcuosRkuUnGpKgmvF6z3XiqsNP0st62fZ_Auib1w@mail.gmail.com>
To: Ivan Herman <ivan@w3.org>
Cc: W3C Digital Publishing IG <public-digipub-ig@w3.org>
>
> 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:

var precacheConfig =
[["404.html","648e3dec564c87d40300e30abf7a464d"],["7a58c37113db4464699ec4f4646b5566.json","7a58c37113db4464699ec4f4646b5566"],["assets/5e7a4451127bdccbb9346f1c8744c0d9.js","5e7a4451127bdccbb9346f1c8744c0d9"],["assets/b708e9296b5e26f6bd725561648a1dda.css","b708e9296b5e26f6bd725561648a1dda"],["assets/diagrams/0220cddf71377e3527a891fc7730625e.svg","0220cddf71377e3527a891fc7730625e"],["assets/diagrams/030c9cc04270134bf2ca3f324980d2bc.svg","030c9cc04270134bf2ca3f324980d2bc"],["assets/diagrams/06b379fb58cbcab5530946c7059bfdef..svg","06b379fb58cbcab5530946c7059bfdef"],["assets/diagrams/084666d979c7b1507df8c538f5557ac9.svg","084666d979c7b1507df8c538f5557ac9"],["assets/diagrams/0a9df9be8ccde8d1f7b59514f74cc63b.svg","0a9df9be8ccde8d1f7b59514f74cc63b"],["assets/diagrams/0b2435f40a21288f26b55208d5a8c5b1.svg","0b2435f40a21288f26b55208d5a8c5b1"],["assets/diagrams/0b393b7cfa29c3479ab323f5e768c055.svg","0b393b7cfa29c3479ab323f5e768c055"],["assets/diagrams/0b9e45b8e052568d223d110681dbf7d3.svg","0b9e45b8e052568d223d110681dbf7d3"],["assets/diagrams/0c1f6cd359e0ec1180aaefdae072335d.svg","0c1f6cd359e0ec1180aaefdae072335d"],["assets/diagrams/13f28d4c3bcea2a8e4420b3278ebffaf.png","13f28d4c3bcea2a8e4420b3278ebffaf"],["assets/diagrams/19e54ddeee77adfc1c724b912f7b2694.svg","19e54ddeee77adfc1c724b912f7b2694"],["assets/diagrams/1a86ca9ae4a3c0e208ddf2f7fdc38b95.svg","1a86ca9ae4a3c0e208ddf2f7fdc38b95"],["assets/diagrams/1a8db2948eb2aad0dd47470c6c011a42.svg","1a8db2948eb2aad0dd47470c6c011a42"],["assets/diagrams/1d7d7e4dc5954b7ee5beb4312a660849.svg","1d7d7e4dc5954b7ee5beb4312a660849"],["assets/diagrams/2a9b83c6b43e961a41a847c3227dcad2.svg","2a9b83c6b43e961a41a847c3227dcad2"],["assets/diagrams/2aaa8d11ee7fd2d8a332e6dc68dc50ae.svg","2aaa8d11ee7fd2d8a332e6dc68dc50ae"],["assets/diagrams/33926d81cc07b922f40ddab7ab00c538.svg","33926d81cc07b922f40ddab7ab00c538"],["assets/diagrams/3394fb4dab93efdd5e49475316c9496f.svg","3394fb4dab93efdd5e49475316c9496f"],["assets/diagrams/37d7e7aded91fc715d7acdefb738793b.png","37d7e7aded91fc715d7acdefb738793b"],["assets/diagrams/3a5cce13fbae63d778029e6fceb51acf.svg","3a5cce13fbae63d778029e6fceb51acf"],["assets/diagrams/40348f35c6999c3ec04290d7177b0b45.svg","40348f35c6999c3ec04290d7177b0b45"],["assets/diagrams/44b1b32df5642e4f8f9c29e901020fbc.svg","44b1b32df5642e4f8f9c29e901020fbc"],["assets/diagrams/4603275cd98c93aeb8c46b1b1afa0ba6.svg","4603275cd98c93aeb8c46b1b1afa0ba6"],["assets/diagrams/47ba5b32e42cf5a06c3741d29ef9b94a.svg","47ba5b32e42cf5a06c3741d29ef9b94a"],["assets/diagrams/4b4766fd02af08ca2894b4cce8b44d85.svg","4b4766fd02af08ca2894b4cce8b44d85"],["assets/diagrams/4c8e63b20be72571abece33e8373575a.png","4c8e63b20be72571abece33e8373575a"],["assets/diagrams/4ee6145071a2992920f9681c069824a4.svg","4ee6145071a2992920f9681c069824a4"],["assets/diagrams/52d5ea44c0ddf990c5296ed2f69f3842.png","52d5ea44c0ddf990c5296ed2f69f3842"],["assets/diagrams/54af0f14aaabe6664274d81d60e38d40.svg","54af0f14aaabe6664274d81d60e38d40"],["assets/diagrams/57c4f352ad8414417d225ecb3665ad07.svg","57c4f352ad8414417d225ecb3665ad07"],["assets/diagrams/5bd4955aeda62721100af43140382c44.svg","5bd4955aeda62721100af43140382c44"],["assets/diagrams/61dc2bae615536155a5af7203ad191fd.png","61dc2bae615536155a5af7203ad191fd"],["assets/diagrams/69aa329ffbfae6fd0446de77623c93fb.svg","69aa329ffbfae6fd0446de77623c93fb"],["assets/diagrams/6c3d168f45e9a1b2965f790c5cd794f0.svg","6c3d168f45e9a1b2965f790c5cd794f0"],["assets/diagrams/6cb3c673b9ae40cfbd2a88ffa02bfc66.svg","6cb3c673b9ae40cfbd2a88ffa02bfc66"],["assets/diagrams/6ff953c25c7677f6bb49c6eb0b8737b1.svg","6ff953c25c7677f6bb49c6eb0b8737b1"],["assets/diagrams/7298dbfb0d0807b5978271b23db938fa.svg","7298dbfb0d0807b5978271b23db938fa"],["assets/diagrams/7414b52caa2f33a9e2feb40afdda9d9e.png","7414b52caa2f33a9e2feb40afdda9d9e"],["assets/diagrams/7695893485cffda5a58d1500a1dd2d7f.svg","7695893485cffda5a58d1500a1dd2d7f"],["assets/diagrams/773ecb15832075c0b56021aa3ad15233.svg","773ecb15832075c0b56021aa3ad15233"],["assets/diagrams/7791d95cced297a18105e4c33c4622a1.svg","7791d95cced297a18105e4c33c4622a1"],["assets/diagrams/80b1e53b1da56b72562364413befa137.svg","80b1e53b1da56b72562364413befa137"],["assets/diagrams/8199bc14fc3e692d5ea83792822d5def.png","8199bc14fc3e692d5ea83792822d5def"],["assets/diagrams/82966133085de5c9aed3229838166dc5.svg","82966133085de5c9aed3229838166dc5"],["assets/diagrams/84cf0f29175e4b11a2343e73105637c5.svg","84cf0f29175e4b11a2343e73105637c5"],["assets/diagrams/8696009a007572bf2da042cb6cef3ec1.png","8696009a007572bf2da042cb6cef3ec1"],["assets/diagrams/8c1bfcf5483aaa50b543906a6e96d284.svg","8c1bfcf5483aaa50b543906a6e96d284"],["assets/diagrams/8e6931bb40fc26c511ad15645e7b6113.svg","8e6931bb40fc26c511ad15645e7b6113"],["assets/diagrams/914c9d3909a00450986d701aa75b385c.svg","914c9d3909a00450986d701aa75b385c"],["assets/diagrams/940cb8cfbb433a04b05e15b4868cb8e3.svg","940cb8cfbb433a04b05e15b4868cb8e3"],["assets/diagrams/96b1cfc37756c1b821d3961418b576ae.png","96b1cfc37756c1b821d3961418b576ae"],["assets/diagrams/9873c7441be06e0b53a006aac442696c.svg","9873c7441be06e0b53a006aac442696c"],["assets/diagrams/9e0502a36ccd2bdd00eb09e1e6cb3b6d.svg","9e0502a36ccd2bdd00eb09e1e6cb3b6d"],["assets/diagrams/a2283460ffae3026632ff33c24bc5462.png","a2283460ffae3026632ff33c24bc5462"],["assets/diagrams/a2813f1c382a12a4b0b0b229ca22ee9f.png","a2813f1c382a12a4b0b0b229ca22ee9f"],["assets/diagrams/a828cacd29afa21ab0336576a1f5c908.svg","a828cacd29afa21ab0336576a1f5c908"],["assets/diagrams/aa67e02b5a082ef886f2db4c9a9c38cc.svg","aa67e02b5a082ef886f2db4c9a9c38cc"],["assets/diagrams/adaebeaa2cbc89c09666a0171e7344f9.png","adaebeaa2cbc89c09666a0171e7344f9"],["assets/diagrams/ae09920e853bee0b21be83f8e770ba01.svg","ae09920e853bee0b21be83f8e770ba01"],["assets/diagrams/b08fb4ce2162927bf9b6ce02cdc64ab0.svg","b08fb4ce2162927bf9b6ce02cdc64ab0"],["assets/diagrams/b4c3a2243fd049c31aa5f9f9c1283e86.png","b4c3a2243fd049c31aa5f9f9c1283e86"],["assets/diagrams/b690c2a309d9c84a92776f6318ec60b8.svg","b690c2a309d9c84a92776f6318ec60b8"],["assets/diagrams/b7877f7c09eee79e8dfd7847e0a5930f.svg","b7877f7c09eee79e8dfd7847e0a5930f"],["assets/diagrams/b83b75dbbf5b7e4be31c8000f91fc1a8.svg","b83b75dbbf5b7e4be31c8000f91fc1a8"],["assets/diagrams/b8cf759a74914c66cec01d50b18de6e0.svg","b8cf759a74914c66cec01d50b18de6e0"],["assets/diagrams/bb75b8bd469ce5b703b76abb7042e978.svg","bb75b8bd469ce5b703b76abb7042e978"],["assets/diagrams/bbd332cec8b573d3797cf8738d274c13.svg","bbd332cec8b573d3797cf8738d274c13"],["assets/diagrams/bf029cd183682281fcef2c53c9eb85a2.png","bf029cd183682281fcef2c53c9eb85a2"],["assets/diagrams/c1a1361326d5c0842b287223f6ab4351.svg","c1a1361326d5c0842b287223f6ab4351"],["assets/diagrams/c1c3a3443e56dea19cd92efc8e554c6f.svg","c1c3a3443e56dea19cd92efc8e554c6f"],["assets/diagrams/cf6057a54f005a288d832d293965ee0d.svg","cf6057a54f005a288d832d293965ee0d"],["assets/diagrams/d754c6b39cccff80641b0030f9f59759.png","d754c6b39cccff80641b0030f9f59759"],["assets/diagrams/d759887277b266a42c526643285dd244.svg","d759887277b266a42c526643285dd244"],["assets/diagrams/d94b0a5d8485d7391717f06ed5e5d74d.svg","d94b0a5d8485d7391717f06ed5e5d74d"],["assets/diagrams/dc5b8e3eb7c7219c13977a42a3fa1631.svg","dc5b8e3eb7c7219c13977a42a3fa1631"],["assets/diagrams/dd02f805c748b0c180bbbba6b24c4287.svg","dd02f805c748b0c180bbbba6b24c4287"],["assets/diagrams/dfedc4f7a99058fb7f6e50d5ac5b763d.svg","dfedc4f7a99058fb7f6e50d5ac5b763d"],["assets/diagrams/e0661f06a9fae1f5346d0efb57178146..svg","e0661f06a9fae1f5346d0efb57178146"],["assets/diagrams/e100cf92c46f65cb9db0b32030421e92.svg","e100cf92c46f65cb9db0b32030421e92"],["assets/diagrams/e32a63d9d4c6b1ffcaf49c42078f47cd.png","e32a63d9d4c6b1ffcaf49c42078f47cd"],["assets/diagrams/e5cc4abb511e6c74a64dd96d75fa9d07.png","e5cc4abb511e6c74a64dd96d75fa9d07"],["assets/diagrams/e76659d1dbe30bbf31d9a5ef6238a236.svg","e76659d1dbe30bbf31d9a5ef6238a236"],["assets/diagrams/e80b19c3f2eb66734051854f9df395bf.svg","e80b19c3f2eb66734051854f9df395bf"],["assets/diagrams/e86b7a4f06d7dad1ce67ee4646c3941b.svg","e86b7a4f06d7dad1ce67ee4646c3941b"],["assets/diagrams/ea05cfc71c5cd7777026101bface157e.svg","ea05cfc71c5cd7777026101bface157e"],["assets/diagrams/ea8e7fb6c96bce4a62ab11458890ad2a.svg","ea8e7fb6c96bce4a62ab11458890ad2a"],["assets/diagrams/edff4f485cfbaa3b77d359c081016bf5.svg","edff4f485cfbaa3b77d359c081016bf5"],["assets/diagrams/eefa1170a673da0140efe1ece7a2884b.svg","eefa1170a673da0140efe1ece7a2884b"],["assets/diagrams/efb151be6600eb5555127c8652488f1f.svg","efb151be6600eb5555127c8652488f1f"],["assets/diagrams/f38aae954de1cde63e2dffddc23a13f3.svg","f38aae954de1cde63e2dffddc23a13f3"],["assets/diagrams/f57e23a8df0dbb1c90d75e02c4abd7bb.svg","f57e23a8df0dbb1c90d75e02c4abd7bb"],["assets/diagrams/f5a120c8182ae808792b8ad40b03a84d.svg","f5a120c8182ae808792b8ad40b03a84d"],["assets/diagrams/f91164cbbb944d8986c90a1e93afcd82.svg","f91164cbbb944d8986c90a1e93afcd82"],["assets/diagrams/f9504a4dede2eb3d3781ec4baab96e93.png","f9504a4dede2eb3d3781ec4baab96e93"],["assets/diagrams/fa9ac7cba0327c032c5e1b57325496a4.svg","fa9ac7cba0327c032c5e1b57325496a4"],["assets/diagrams/feb142f82737d148ed5bcefd91915276.svg","feb142f82737d148ed5bcefd91915276"],["assets/equations/00488afca0d76fd6e09c993be946c0f8.svg","df545a4975981f73d6ecbfb4ff18729d"],["assets/equations/049eff553bd9ca9d938cd70fbe839f95.svg","52c153a88bda3d7894c126764b4f2a20"],["assets/equations/063b4830d0fbf479c5c074b042643a89.svg","3c3053835ec3f3f159bdea7ae48498ca"],["assets/equations/2a61d2f4306aa5d7529d1855aabf1d09.svg","512de74418c0e2fc99d0b5a79d4b376b"],["assets/equations/376a4471fad32292e6d2c8b8df0f1fdd.svg","2602391a90fddab30fb03d3844770906"],["assets/equations/3c920a91865a3a797bfed353b70448f9.svg","5eff1da01b43504e75780bc29e26b6c3"],["assets/equations/48a4d1e31c7d915006252e18a7be0e23.svg","bf8979b27316c7318479d4487479f867"],["assets/equations/635c6b163d4772ef406b47ecb2f00339..svg","bc8504fe68642b103ec1699782daa706"],["assets/equations/8430e1506bff95cf840315bd1d6d7365.svg","8c3547f592521e6765d5383e79f03d15"],["assets/equations/8953da8062cd144827586471ce5f3cde.svg","ce49994498291206b24c58556029d0c1"],["assets/equations/b9a23519240d24d73ae91d1ea28faa27.svg","0cceb6d07d1952e8de77c361ffcd86f2"],["assets/equations/ccbf5c975dcc68991d8844e31267d59d.svg","0c008eb8313f4be6a76d8591eea86e44"],["assets/equations/ceefbf33a84776dbdff23f70ee00dfad.svg","e8f8795f165def0c2d85d7360be6aab5"],["assets/equations/cfa8855d073e50488c96c187112772ea.svg","614b0decc98f8f8c257c738ae0e69090"],["assets/equations/d78d76d61cd02dff2f4328bb414fe1f4.svg","5a552dde7a67cd55403c22b21bbdb61f"],["assets/equations/d9552b4fd523ec32e5b830d016cc9c56.svg","aacf8ab40a7a778c6cf51e2f7f541f86"],["assets/equations/e132c1fccde93c4359cddcd01e79e098.svg","da34c8999dcf17f5006c79c89afef644"],["assets/equations/e4d3c630db37ce2af158b869d489901b.svg","18d5d826e58c5063b5e2cf620e805ac4"],["assets/equations/ff529f93b49270aac2bb7a2707a445e8.svg","0bec9fe1eabd1d2c9c7b4585507ce230"],["assets/icons/icon-192.png","ae0a23f1392f313f59c1c0e2be70f18d"],["assets/icons/icon-256.png","c60f3c8df736dd614b8bf559b8574684"],["assets/icons/icon-512.png","f8fbcc040f37912b782061ea82cecb73"],["assets/icons/icon-96.png","ea07af20607407a9f974918a0a75c28c"],["assets/share.jpg","3051e488244a7d702e295af3d5e20e46"],["assets/small-bird.png","e767e80a4aca9e31b142e8a4a1e41ef7"],["assets/twitter.jpg","3292082e5de1dd552fca775ad205d3ad"],["brief-history-of-http/index.html","55798b2c660eba905ac933e096e6bf74"],["building-blocks-of-tcp/index.html","67c4e5dec84e69fbf24b4f17a357a2df"],["building-blocks-of-udp/index.html","d7bede5dece111a5b25aafac9277959c"],["http1x/index.html","a12ae8511828e6d4ee09852edaef2f44"],["http2/index.html","e8eab028f9bab856465fe8a30406d27d"],["index.html","3c45280f71ebe9956d84a958b9a562a1"],["introduction-to-wireless-networks/index.html","24a18857849082968920871e6bc185eb"],["mobile-networks/index.html","aec421878bac582462b20283aafa4d08"],["optimizing-application-delivery/index.html","a8b951e780af48f137aaffe4c6c0293d"],["optimizing-for-mobile-networks/index.html","286d1f78c5bf107717aeb41f01b9e9db"],["primer-on-browser-networking/index.html","ea34538e434c90e1e821ac34fe2805d9"],["primer-on-latency-and-bandwidth/index.html","e85453c5a943db72a407fedd008fb300"],["primer-on-web-performance/index.html","3da5a04e12a221fe67c8041a89bfe61e"],["server-sent-events-sse/index.html","38a81b9f3d280aac12cb96ac087a1310"],["transport-layer-security-tls/index.html","f5cf83c8b4c1b2924ec0fd346e45ae7b"],["webrtc/index.html","7eb0151630f171304aa2d6b2585faaf0"],["websocket/index.html","b8a5a55fc09ab228f76ed4d0c829f660"],["wifi/index.html","92ec725f6dedca86fc3e9e8659462876"],["xmlhttprequest/index.html","faff2d5fa6158701d87dce77137a26a3"]];
var cacheName = 'sw-precache-v2-hpbn-' + (self.registration ?
self.registration.scope : '');
Received on Monday, 24 October 2016 14:23:28 UTC

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