demo · v139

Beacon Delivery A/B Comparison

Without retry, a keepalive beacon that hits a flaky network is silently lost. Chrome 139 lets you specify a retry policy — watch delivery rates diverge as you increase the simulated failure rate.

v139's retry option is behind an origin trial. This demo simulates the protocol in JavaScript so you can compare delivery rates without needing OT access.
40% failure
sendBeacon — no retry
0
delivered
0
lost
delivery %
fetch keepalive + retry (v139)
0
delivered
0
lost
delivery %
Why this matters: Analytics events fired on page unload (session end, conversion, exit intent) have no second chance with sendBeacon. A 40% failure rate means 40% of session-end data is silently lost. With v139 retry, the same flaky conditions produce near-complete delivery.

the code

// Before v139 — fire and forget, no retry
navigator.sendBeacon("/analytics", JSON.stringify(event));

// v139+ — keepalive fetch with retry policy
fetch("/analytics", {
  method: "POST",
  body: JSON.stringify(event),
  keepalive: true,
  retry: {
    maxAttempts: 3,
    initialDelay: 500,
    retryAfterUnload: true,
  },
});

see also