Overview

Service Workers are a core technology behind Progressive Web Apps (PWAs). They act as a proxy between the web application, the browser, and the network, allowing for powerful features like offline support and background synchronization.

Key Capabilities

  • Caching: Intercept network requests and serve cached responses for offline use.
  • Push Notifications: Receive and display notifications even when the app is closed.
  • Background Sync: Defer actions until the user has a stable internet connection.
  • Security: Must run over HTTPS to prevent man-in-the-middle attacks.

Lifecycle

Service workers have a distinct lifecycle: Registration, Installation, and Activation.

Related Terms