releases.shpreview

Session-activity writes throttled to 5s granularity

posthog-js@1.376.5

May 31, 2026PostHog JSView original ↗
1 fixThis release1 fixBug fixesAI-tallied from the release notes

1.376.5

Patch Changes

  • #3686 66cbc59 Thanks @pauldambra! - fix(persistence): throttle session-activity timestamp writes to a 5s granularity. The in-memory value still moves at full resolution; only writes to localStorage/cookie are coalesced. Activity-timestamp-only updates within the granularity window are skipped, dropping localStorage write pressure and cross-tab storage event broadcasts on pages that capture many events per second. The pending in-memory value is flushed on destroy and beforeunload so a tab close inside the window does not leave the persisted value up to 5s stale for sibling tabs. The flush re-reads storage first and bails out if a sibling tab has rotated the session, so the flush cannot clobber the new session with the old id/start. (2026-05-31)
  • Updated dependencies [d9ad199]:
    • @posthog/core@1.29.14
    • @posthog/types@1.376.5

Fetched May 31, 2026