Answer
A service worker is a script that runs separately from the web page. • It can handle network requests and cache files. • It helps pages work offline or load faster. • It requires HTTPS on normal websites.
💡 Simple Example
<p>navigator.serviceWorker.register('/sw.js');</p>
⚡ Quick Revision
A service worker can control caching and offline behavior.