kaihendry / mrt

Sane SVG MRT map for Singapore public transit
http://mrt.dabase.com
16 stars 2 forks source link

Use Service Workers #2

Open cheeaun opened 8 years ago

cheeaun commented 8 years ago

It's time to use Service Workers, replacing HTML5 appcache http://www.html5rocks.com/en/tutorials/service-worker/introduction/

This provides an easy start to using Service Workers: https://github.com/GoogleChrome/sw-precache

kaihendry commented 8 years ago

Seriously? With http://caniuse.com/#feat=serviceworkers ?

Also service workers is so much more complicated than https://github.com/kaihendry/smrt/blob/gh-pages/smrt.appcache ... don't you think?

Or can you get it down to 6LOC? :grin:

cheeaun commented 8 years ago

From my experience, the biggest reason to ditch appcache is because it's very buggy and it's not 100% offline (for example, cache will be invalidated if server goes down, which totally doesn't make sense for me).

kaihendry commented 8 years ago

Well, I am dubious, but please go ahead and develop it. I will accept the PR, as I am keen to learn to properly weigh up the pros and cons. :smile: