3 ms·
It's more of an extension to the cache philosophy. Service Workers let you handle caches more directly and describe what your site looks like when you have no i
by pfooti 11y ago
It's more of an extension to the cache philosophy. Service Workers let you handle caches more directly and describe what your site looks like when you have no internet at all. In a lot of cases that doesn't really make sense, but if you have some critical content that all your users need, even offline, you can make sure it's always there. You could also do stuff like: prevent all images from loading unless the user requests them, show a handy offline page (instead of the dinosaur), and importantly if you're using the app shell model, users can seamlessly pin your site to their homescreen, providing a very app-like feel (splash screen, no browser url bar, first-class switcher status).
This is also a particularly big deal in countries where wifi and LTE are less prevalent, or where users regularly switch to airplane mode to conserve data. According to Tal Oppenheimer's talk [0] at the recent Chrome Dev Summit, an hour of minimum-wage work in India would pay for about fifteen web pages' worth of data cap. In that regard, being aggressive in how and what you cache makes a lot of sense.
0: https://developer.chrome.com/devsummit/sessions/emerging https://developer.chrome.com/devsummit/sessions/emerging