3 ms·
seems a bit weird to use a service worker to do an offline version... the tutorial linked is long and worthless if you want people to quickly install and use it
by jokoon 2y ago
seems a bit weird to use a service worker to do an offline version... the tutorial linked is long and worthless if you want people to quickly install and use it, you need to either make a shorter more concise tutorial.
imagine somebody loses internet access, he can't really open this thing to just access a map, I don't understand.
why not just provide a html file with the tiles encoded as base64 or something similar? just provide a zip file... I am not a web developer, this seems like a good thing, but deployment is 1/10... minimalist things are supposed to be very easy to deploy.
EDIT: just saving the page, and it works. I don't understand what the service workers are for. web dev has mysterious ways.
- likeclockwork 2y agoThat's what service workers are for. This service worker explicitly caches all the resources the app needs to run then intercepts requests for those resources so all the JS that depends on the resources still runs while you're offline. If you had visited the site in the past, even if you were offline you would be able to go to that URL and the service worker would serve everything needed from cache.
- jokoon 2y agothat means the demo doesn't have a service worker?