github PostHog/posthog-js posthog-js@1.428.5

4 hours ago

1.428.5

Patch Changes

  • #4703 5c34aee Thanks @posthog! - Stop the internal SCRIPT_PLACEHOLDER from rendering during replay. A recorded <script> is rebuilt as <noscript>, whose text shows when scripting is off in the replay iframe. The document-scoped hide style never reaches shadow roots, so the placeholder leaked over third-party widgets recorded in a shadow root. Rebuild now emits an empty text node for the placeholder, so it cannot render in any context.
    (2026-09-08)

  • #4801 7ae27fe Thanks @marandaneto! - Reduce session replay DOM traversal overhead by reusing native-accessor cache keys instead of constructing a new string for every node access.
    (2026-09-08)

  • #4808 60644f7 Thanks @marandaneto! - Avoid repeatedly traversing the same subtree during session replay mirror cleanup when it moves multiple times in one mutation batch.
    (2026-09-08)

  • #4816 c80df37 Thanks @marandaneto! - Reduce shadow DOM connectivity checks during session recording.
    (2026-09-08)

  • #4812 4163648 Thanks @marandaneto! - Reduce session recording overhead by avoiding empty child-list reads for text nodes during mutation processing.
    (2026-09-08)

  • #4811 44b0a6c Thanks @marandaneto! - Reduce session recording overhead when DOM subtrees are moved repeatedly by avoiding per-node traversal callbacks.
    (2026-09-08)

  • #4819 fe828ff Thanks @posthog! - Fix two silent session replay failures. Recorder teardown no longer stops when a cleanup handler throws, so recording restarts after an idle reset and isRecording() stops reporting a stopped recorder as started. Playback no longer ends or stalls when a recording holds a malformed mouse-move positions value; the player skips that one event and falls back to the event's own timestamp instead of scheduling it at a time the timer can never reach.
    (2026-09-08)

  • #4756 54be921 Thanks @posthog! - Session replay no longer loses the start of a recording when a page unloads while a timing gate holds the buffer. The minimum-duration gate and the markers-only gate both hold the buffer for a retry that an unloading page never runs, so the buffered snapshots died with the page. They are now parked in sessionStorage and picked up by the next page in the same tab, which keeps the configured minimum duration intact: a session that really ended on that page still ships nothing
    (2026-09-08)

  • #4813 8e58a12 Thanks @posthog! - fix(browser): drop Safari extension exceptions that report a WebKit messaging failure
    (2026-09-08)

  • #4807 7222acc Thanks @marandaneto! - Reduce per-node allocations when serializing session replay mutations by reusing serialization options within each emission.
    (2026-09-08)

Don't miss a new posthog-js release

NewReleases is sending notifications on new releases.