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.
| Aspect | Background page (V2) | Service worker (V3) |
|---|---|---|
| Lifecycle | Can remain loaded | Event-driven, may stop |
| State | In-memory state persists | State must be persisted separately |
| Network access | Available | Available |
| Manifest field | background.page or scripts | background.service_worker |
| Browser direction | Legacy | Current 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.