JavaScript

Explain Service Workers and their use cases

Hard
4
Added
Proxy between browser/network. Enables offline support, background sync, push notifications.

Solution Code

JavaScript
navigator.serviceWorker.register('/sw.js');
Explanation
Requires HTTPS. Lifecycle includes install/activate phases.

Guided Hints

Cache strategies
Update mechanisms