Glossary
Glossary Workers

Workers

Also known as: worker
TechWeb

Definitions

Web Workers: a browser API that runs a script on a background thread, off the main thread, with no access to the DOM

For heavy computation that would otherwise block rendering and input. Page and worker communicate by posting messages. MDN: Web Workers API.

Tech

Service Workers: a kind of web worker registered for an origin and path, acting as a proxy between the page, the browser and the network

The basis of offline caching, push notifications and background sync. It requires a secure context (HTTPS). MDN: Service Worker API.

Tech

Cloudflare Workers: server-side code running in V8 isolates on Cloudflare's network. Not a browser API, though it borrowed the Service Worker programming model

See the tech entry, Cloudflare Workers.

Tech

Three things share the name, and only the first two run in a browser. When someone says "workers" in a web project, it is worth asking which: a Web Worker moves work off the main thread, a Service Worker sits between the page and the network, and a Cloudflare Worker is a server.

See Also

  • a: Appearance
  • ?: Keyboard shortcuts