Lifecycle and state

A persistent background page keeps in-memory state for the life of the browser session. A service worker is suspended when idle, so extensions must persist important state in storage and reinitialize on wake.

The service worker model reduces idle resource use. It does not inherently reduce access to APIs, pages or network endpoints.

Background execution models
AspectBackground page (V2)Service worker (V3)
LifecycleCan remain loadedEvent-driven, may stop
StateIn-memory state persistsState must be persisted separately
Network accessAvailableAvailable
Manifest fieldbackground.page or scriptsbackground.service_worker
Browser directionLegacyCurrent Chromium model

Related pages:Manifest V2 vs V3browser extension privacy guide

What to inspect in either model

Read the background script or worker for network calls, storage access, message handling and remote code references. Check whether it registers event listeners that observe tabs, history, web requests or cookies.

The analyzer reports the background type, service worker or script paths, and static findings from the referenced files. It also shows the update URL and CSP, which affect what can change later.

Related pages:JavaScript behavior analyzerextension CSP

Privacy does not follow the manifest version

A service worker can be just as invasive as a background page if it has broad permissions and sends data to third parties. A legacy background page can be carefully scoped and transparent.

Use the lifecycle as context, not as a safety label. Pay attention to what data the background context can reach and where it sends it.