DEV Community

Discussion on: Explain Service Workers like I'm five

Collapse
 
rapidnerd profile image
George

You go into a candy store, and chose your candy. Because you don't need to open the cash register or count the money the person behind the counter does it for you. While he's doing that you stare at other candy because you don't need to see it although sometimes we're interested to see it.

Basically a process that runs in the background of a browser that doesn't require your to do anything or have user interface.

Collapse
 
damcosset profile image
Damien Cosset

How are resources distributed between the background and the foreground? I'm not sure if this is a relevant question, but we fork something from the foreground, this means that something isn't available anymore?

What is the tradeoff in using a service worker? I gain something by letting someone else handle the cash register, but what am I losing?