5min chapter

Syntax - Tasty Web Development Treats cover image

Fundamentals - Web Workers and Service Workers

Syntax - Tasty Web Development Treats

CHAPTER

The Life Cycle of a Service Worker

When you install a service worker, what it's essentially doing is grabbing that java script and saving it into your browser or your local cash. So once the service worker is running, every single time that you visit a web site, that service worker is going to immediately run. And if you have things like net workndeception in there, that's where you're allowed to serve up a local version because the person is off line. If you register a service worker and you say, serve up this cash, and you don't give it any instructions to kill itself, then that cash will always be served up everysingle time thatyou visit the web sit.

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode