Graphics & Compute

SharedArrayBuffer & Cross-Origin Isolation

Probing…

SharedArrayBuffer & Cross-Origin Isolation is a web platform capability in the Graphics & Compute category. Shared memory between threads — requires COOP/COEP headers. Supported in Chromium 68+, Firefox 79+, and Safari 15.2+. Requires a secure context (HTTPS or localhost) and cross-origin isolation (COOP and COEP headers).

Secure contextCross-origin isolated

Try it

Loading demo…

Code

if (crossOriginIsolated) {
  const sab = new SharedArrayBuffer(4)
  const view = new Int32Array(sab)
  worker.postMessage({ sab })   // shared, not copied

  // inside the worker:
  const view = new Int32Array(e.data.sab)
  Atomics.add(view, 0, 1)       // atomic write to shared memory

  // main thread reads the same bytes:
  Atomics.load(view, 0)
}

Browser support

Chromium
68
Firefox
79
Safari
15.2

Frequently asked questions

Which browsers support SharedArrayBuffer & Cross-Origin Isolation?

Supported in Chromium 68+, Firefox 79+, and Safari 15.2+.

Does SharedArrayBuffer & Cross-Origin Isolation require HTTPS?

Yes. SharedArrayBuffer & Cross-Origin Isolation needs a secure context, so it only works over HTTPS (or on localhost during development).

What is SharedArrayBuffer & Cross-Origin Isolation used for?

Shared memory between threads — requires COOP/COEP headers.

Can I try SharedArrayBuffer & Cross-Origin Isolation in my browser?

Yes. shwcs.net runs a live SharedArrayBuffer & Cross-Origin Isolation demo that probes your current browser and lets you try the API. Everything runs locally — nothing is sent anywhere.

MDN reference ↗ Specification ↗