← Declarative Performance Observer
v151 · origin trial · performance entry
PerformanceSessionEndTiming
A new PerformanceEntry type proposed by the Declarative Performance Observer: an anonymous terminal marker the browser appends when a session ends, giving the precise total session duration (dwell time after the last recorded event) that JavaScript cannot reliably measure.
structure
Inherits from PerformanceEntry. In the report payload it serializes as:
{ "name": "session-end-event",
"entryType": "session-end",
"startTime": 240200,
"duration": 0 }
entryType | "session-end" |
|---|---|
name | "session-end-event" (in the explainer's payload examples) |
startTime | The timestamp of session termination; subject to standard HR-Time clock-resolution coarsening |
duration | 0 |
semantics
- Terminal entry. Synthesized by the browser at session end (tab close, navigation away, BFCache entry, renderer crash, early network error) and reported as the last entry of the session's
entriesarray. - Anonymous by design. The entry does not reveal any closure-type details — there is no field distinguishing a crash from a normal tab close; only the end timestamp is exposed (“This entry doesn’t reveal any closure type details, except for
start_time”). Note: the explainer's table of contents lists a “Crash Detection Heuristic vs. Explicit Field” discussion section, but that section has no content as of 2026-07-28 — whether closure typing will be added is an open design question. - Why it exists. The explainer considered not adding any new type (spec minimalism) but kept an explicit terminal entry because without it the precise total session duration — dwell time after the last recorded event — is unmeasurable.
- BFCache. Entering the back/forward cache ends the session (and emits this entry); a restore starts a new session.
examples
Full session report ending with the session-end entry (abridged from the explainer's worked example):
{
"type": "performance-observer",
"age": 100,
"url": "https://www.example.com/second",
"user_agent": "Mozilla/5.0 …",
"body": {
"entries": [
{ "name": "https://www.example.com/second", "entryType": "navigation",
"startTime": 0, "domainLookupStart": 68, "domainLookupEnd": 120,
"connectStart": 122, "responseStart": 562 },
{ "name": "hero-image-loaded", "entryType": "mark",
"startTime": 780, "duration": 0 },
{ "name": "session-end-event", "entryType": "session-end",
"startTime": 240200, "duration": 0 }
]
}
}
// Total session duration: 240200 ms (startTime of the terminal entry).
Source: explainer — example report payload.
browser compatibility
| Browser | Support |
|---|---|
| Chrome / Edge (Chromium) | Origin trial 151–155 with the Declarative Performance Observer feature (ChromeStatus); no BCD entry |
| Firefox | No signal |
| Safari | No signal |
security & privacy
- Anonymous: the entry carries only a coarsened timestamp — no closure reason, no page state (data minimization).
- Time values follow HR-Time clock-resolution limits, mitigating high-precision-timer side channels.