demo · v139

Beacon Survival Simulator

Keepalive beacons fired on page unload have no JavaScript context to retry from. Without v139's retry, a single dropped packet means a lost analytics event. Simulate a flaky network and watch the survival rate climb when you turn the retry policy on.

v139's retry option for keepalive fetches is under origin trial. This page simulates the protocol on top of plain fetch with a fake-failure rate so you can interact regardless of OT status — the dial behaviour mirrors the real specification.
40%
3
0
total attempts
0
delivered
0
lost

log

the code

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

see also