by jokoon · 2y ago · 0 comments
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.
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.