releases.shpreview

Unload beacons no longer lost on cross-origin hosts

posthog-js@1.399.4

July 13, 2026PostHog JSView original ↗
1 fixThis release1 fixBug fixesAI-tallied from the release notes
From the original release noteView original ↗

1.399.4

Patch Changes

  • #4139 7c339be Thanks @turnipdabeets! - Encode uncompressed sendBeacon bodies as base64 form data so the beacon keeps a CORS-simple content type. Previously an uncompressed unload beacon was sent as application/json, which forces a CORS preflight — a preflight cannot complete while the page unloads, so on cross-origin hosts the browser silently dropped the POST and the final batch of events was lost. Compression is inactive whenever the remote config request fails (flaky network, blocked endpoint), when the config response omits supportedCompression, or with disable_compression: true. (2026-07-13)

Fetched July 13, 2026

Unload beacons no longer lost on cross-origin hosts… — releases.sh