Best use case of this I guess, is some kind of flight mode for web apps. Before going in to metro or flight, you click a button, and for example HN caches front page for you.
Writing a Service Worker
11–20 of 60 posts
Re: Writing a Service Worker
#12>This is, unfortunately, a familiar scene for everyone, whether you are in Tokyo, Milan or New York. Damn it, if I'm going to have the song stuck in my head all day so should all of you! https://www.youtube.com/watch?v=P5mtclwloEQ
Re: Writing a Service Worker
#13Best use case of this I guess, is some kind of flight mode for web apps. Before going in to metro or flight, you click a button, and for example HN caches front page for you.
Re: Writing a Service Worker
#14Re: Writing a Service Worker
#15How large can the cache get at max?
Re: Writing a Service Worker
#16Re: Writing a Service Worker
#17Ah this is really nice but still feels quite verbose (+the web standards are know for their bad documentation for end devs). A small library with good documentation making things easier could kill it, similarly to localstorage, cookies, etc.
One of the more gnarly parts of ServiceWorker is having to clean up old caches during a version change. The workbox-build module generates revision hashes for your pre-cached assets and handles any cache clean ups for you.
Re: Writing a Service Worker
#18Could this be used to optionally reduce bandwidth use? For instance, could someone use this before going into Airplane Mode, even though they are in the middle of a city, but do not want to use wireless data?