Unload beacons no longer lost on cross-origin hosts
posthog-js@1.399.4
1 fixThis release1 fixBug fixesAI-tallied from the release notes
From the original release noteView original ↗
1.399.4
Patch Changes
- #4139
7c339beThanks @turnipdabeets! - Encode uncompressedsendBeaconbodies as base64 form data so the beacon keeps a CORS-simple content type. Previously an uncompressed unload beacon was sent asapplication/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 omitssupportedCompression, or withdisable_compression: true. (2026-07-13)
Fetched July 13, 2026
