/

/

Service Worker

Service Worker

Service Worker

A service worker is a script the browser runs in the background, apart from the page, to intercept requests, cache responses, and receive push notifications. Web push and some synchronous experiment setups depend on one being registered from the site's own root path.

Updated

Category

Bloomreach Dev

Also known as

service-worker.js; PWA service worker

In practice

A service worker only registers if the file is served from your domain at the scope it should control. That is why features that need one don't run on hosted site builders with no root-level file slot. Check the browser console for a failed registration before assuming a push or experiment feature is misconfigured; the SDK usually logs the fallback it took.

Something out of date?