Service Worker Quiz
Multiple Choice Medium
Question
Where does a service worker run relative to the web page?
Hint
It cannot access the DOM directly.
Explanation
Service workers run in a separate thread, completely independent of the web page. They cannot access the DOM directly — they communicate with the page via postMessage. This separation lets them run in the background, handle push notifications, and serve cached content even when the page is closed.
Related Resources
Related Lessons
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.