Skip to Content
Platform.Ontology

Cross-origin isolation and SharedArrayBuffer clocks

Sites that send COOP and COEP headers unlock finer timers and SharedArrayBuffer.

Gets silentlySpeed and timingTimersWeb browsersWhile you use it

In one line

Can use a very fine clock and shared memory, but only if the site opts in

Sites that send COOP and COEP headers unlock finer timers and SharedArrayBuffer.

Gives a page a 5 microsecond clock and shared memory, both needed for wasm threads. A worker counter on SharedArrayBuffer is a high resolution clock that also powers Spectre-class attacks.

What it can and can't do

What the user does: Nothing. The site sets special page headers when it loads

It can

  • Get a clock down to about 5 microseconds
  • Share memory between its own background workers
  • Run heavier tools such as WebAssembly threads
  • Use these also for very precise timing attacks

It cannot

  • Get these without the special page headers
  • Load some outside content like ads and embeds freely
  • Ask permission first
  • Work in older browsers

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported922021-07-20None
EdgeSupported922021-07-22None
FirefoxSupported792020-07-28None
SafariSupported15.22021-12-13None
Safari on iPhoneSupported15.22021-12-13None
Chrome on AndroidSupported922021-07-20None
Samsung InternetSupported16.02021-11-25None

How a site asks for it

APICross-Origin-Opener-Policy: same-origin; Cross-Origin-Embedder-Policy: require-corp; self.crossOriginIsolated
Browser compat keysapi.Window.crossOriginIsolated
How access is grantednone
What the user seesNot listed
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsNot listed
How to take it backNot listed
Inside an iframeNot listed

Typical flow

  1. Send COOP and COEP headers
  2. Check crossOriginIsolated
  3. Use SharedArrayBuffer and performance.now at finer resolution

Data you get

What comes back: crossOriginIsolated true or false
Shape: boolean

FieldTypeUnitRangePrecision
crossOriginIsolatedbooleanNonetrue or falseexact
timer resolutionfloatmicroseconds5 (Chrome), 20 (Firefox)fixed

Technical limits

  • Isolation blocks embedding non-CORP cross-origin content
  • Not available in iframes without allow and the same headers

The story

What it is

Sites that send two special headers unlock very precise timers and shared memory for heavy apps.

For you

You do not choose or see this. Heavy web apps like big games or video editors run faster in a tab, because the site proved it is walled off from others.

For makers

Isolation unlocks threads, shared memory and finer timers, which are needed for fast code. The cost is that the site must prove all content it loads is safe, which can be hard with ads and embeds.

Where you see it

TypeExampleApps
gamesA big web game built with Unity or Unreal uses several threads in a tab, which needs isolation to run well.Unity WebGL games
creativeA browser video tool like ffmpeg.wasm runs faster with shared memory.Clipchamp, Photopea
developerA code editor in the browser runs a whole dev server in a tab using threads.StackBlitz, VS Code web
musicA web DAW processes many audio tracks at once on several threads without crackles.Soundtrap
productivityA design or spreadsheet app runs heavy calculations on many threads in the browser.Figma, Google Sheets
securityResearchers use finer timers to study side channel attacks, which is why browsers wall these timers off.None named
educationA browser based coding class runs Python in a tab with shared memory so lessons feel fast.Pyodide demos

Risks

  • Embeds and ads can break
  • Makes timing attacks easier if misused

What the platform says

Good uses and abuse

Legitimate uses

  • WebAssembly threads, ffmpeg.wasm, video editors

Known abuse

  • Enables micro-timing side channels in a compromised cross-origin context

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction1 of 5How much the user has to do
Fingerprint bits1Rough identifying entropy, when known

History

  • 2018-01, all: SharedArrayBuffer disabled after Spectre
  • 2020-07, Chrome 92: SAB re-enabled for cross-origin isolated pages
  • 2021-01, Firefox 79: SAB re-enabled for isolated pages
  • 2021-12, Safari 15.2: Cross-origin isolation and SAB supported

Sources

How well checked: Based on official documentation.

On this page