Service Worker - Out of the shadows – CSS day 2019
Leggera introduzione sui service worker. Tanto leggera da evitare la tipica sonnolenza post pranzo.
Andata sul palco il 15 marzo 2019 a Faenza durante il CSS day.
if (request.headers.get('Accept').includes('text/html')){} // HTML? if (request.headers.get(‘Accept’).includes('image')){} // IMG? if (request.headers.get(‘Accept’).includes('pizza')){} //
• networkOnly – only fetch from network • cacheOnly – only fetch from cache • fastest – fetch from both, and respond with whichever comes first • networkFirst – fetch from network, if that fails, fetch from cache • cacheFirst – fetch from cache, but also fetch from network and update cache