markdown guide
 

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.

 

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?

 

Service Workers are a JavaScript based proxy written by the devs of PWAs that allow the programmatic control of the cache of your site/origin and are the main driving force in giving web developers the ability to make your websites available offline.

Some more great resources to get started:

 

You are driving a car on a highway, focused on traffic around you. There is music playing on the radio you turned on when you started the car. While driving, you hear different songs, but are not actively selecting any of them. You hear a song you do not like, so you change the radio station.

You driving the car is the main web page and the service worker is the radio. When you start the car, the worker can begin and continues working without your interaction. When you change the station, you are effectively sending a message to the worker to do work, and the result is a different stream of music in the car.

 
Classic DEV Post from Jan 25

Letter to Myself Ten Years Ago

Inspired by the viral 10-year challenge on social media, when people show the world what they looked like 10 years ago, I decided not to share my photos of that time.

Damien Cosset profile image
French web developer mostly interested in Javascript and JAVA

dev.to now has dark mode.

Go to the "misc" section of your settings and select night theme ❤️