←back to thread

260 points gherkinnn | 4 comments | | HN request time: 2.423s | 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 #
1. 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 #
2. bathtub365 ◴[] No.42165590[source]
Radio is one of the biggest users of battery on mobile devices.
3. jonahx ◴[] No.42165735[source]
I'm not asking about web workers generally. I'm specifically asking about their use as a client side cache as described in the article.
4. 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.