Feature Library
<0.01 CPU ms
A still of the Offline sync demo
Still
The live demo starts when it’s in view.Switch a phone off, edit on two phones, switch them back · or try a scenario above the phones

Shared lists that keep working with no signal.

What it costs a frame

<0.01 ms
GPU
not used
CPU, median
<0.01 ms
CPU, 95th pct
<0.01 ms
Draw calls
0
Weight
Light

Measured 11 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured with the demo running its three scenarios in a loop at a 60 ms network delay: phones going offline and back, edits queued and merged, a delete reaching a phone that was away, a month skipped and a full resend. The server, the network and three sync engines all run in the page; the phones re-render on every change. Nothing runs between changes outside the bench. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring toolnot timed<0.01<0.01
apple · Apple A19 Proin a browser tab · 16 November 2026not timed<0.010.02
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026not timed<0.01<0.01

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages

What it’s for

  1. Lists used where the signal comes and goes
  2. Live updates on every phone in a small team
  3. Edits that survive a closed app
  4. Votes cast at once without overwriting
  5. A tiny backend on one Durable Object
  6. Testing sync without a network

Pitfalls, in brief

  1. “Last write wins” means the last write to reach the server, field by field.
  2. Deletes are tombstones (deleted: true) kept 30 days (keepDeleted).
  3. Who did something comes from the connection, never from the change: the server strips by and id from every patch and stamps by itself.
  4. A kind with no rule is refused, and the client rolls the change back.
  5. Clear a field with null, not by leaving it out: a patch only changes the fields it names. put() turns undefined into null for you.
4 more in brief
  1. The saved copy is the whole state in one JSON string (localStorage by default, about 5 MB).
  2. Pings go every 20 s, and a connection with nothing heard for 45 s is dropped and made again: a phone that slept keeps a half-open socket otherwise.
  3. One Durable Object holds everything here (fine for a small group: thousands of writes a second).
  4. The Worker adapter is reference code with typed stand-ins for the Workers APIs: the server logic is tested in the page, but run the adapter with wrangler dev before relying on it.
9 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From My other apps. Fully custom code.

Cloudflare Durable Objects: WebSocket hibernation and SQLite storage: acceptWebSocket, socket attachments, auto-responses and ctx.storage.sql as documented; the adapter is the app’s own code

WAI-ARIA Authoring Practices Guide (W3C): the Switch pattern (a checkbox with role switch) for each phone’s network, and announcements through a polite live region, in the demo

offline firstsyncoptimistic updatesoutboxqueuecatch-upversionstombstoneslast write winsfield-level mergeWebSocketreconnectback-offCloudflare WorkersDurable ObjectsSQLitehibernationvoteslocalStorageuseSyncExternalStorelive regionaccessibilitykeyboarddom

Near it in the frame