←back to thread

260 points gherkinnn | 1 comments | | HN request time: 0.203s | source
Show context
jonahx ◴[] No.42165501[source]
Can someone explain what the service worker strategy accomplishes that plain old http Cache headers don't? It saves a (almost zero weight) network roundtrip, but feels like it's re-inventing the entire wheel for that small (I think) optimization? Am I missing something?
replies(6): >>42165572 #>>42165591 #>>42165649 #>>42165780 #>>42165856 #>>42166137 #
ysofunny ◴[] No.42165572[source]
that they can be used to compute stuff locally

I imagine ideally we want user choice of where the computation is happening. if on a mobile device I'd save battery in exchange for network latency

but in a desktop computer I'd rather do as most local computation as I can

replies(3): >>42165590 #>>42165735 #>>42165956 #
1. plorkyeran ◴[] No.42165956[source]
For the sort of thing that are fast enough that network latency is relevant, on a mobile device you save battery by doing them locally. The radio takes more power than the cpu.