Cross-frame performance timeline
- Category
- Miscellaneous
- Type
- No developer-visible change
- Status
- In development (Chrome In development)
- Intent stage
- Start prototyping
Summary
This feature enables a standard way for a page which embeds content in frames to request performance timeline entries from those frames, and for the embedded site to opt-in to permitting sharing of its performance timeline entries with its embedders. This enables developers to gather whole-page performance information, and attribute performance issues to the frames in which they occur. A document-policy-based opt-in for embedded content enables embedded content to choose to share performance data without needing to explicitly coordinate JavaScript with every potential embedder.
Motivation
The PerformanceTimeline API allows developers to access performance events, such as navigation timing or subresource load timing, from documents on which they can run scripts. However, a single document is often only a small part of the page that a user experiences, and developers of the top-level document can be blind to performance problems in other parts of the page. To protect the user's privacy, browsers intentionally do not allow this sort of data to be inspected from cross-origin frames, but there is nothing stopping cooperating frames from using existing channels (postMessage, etc) to communicate. An analytics provider, for instance, could supply authors of embedded content with a script to run which would communicate with a library running in the top-level page. This requires explicit cooperation between the authors of the top-level page and those of each embedded page, and it doesn't scale well: a popular embedded page (an embedded video player, for instance, or an advertising network) would need to have custom, probably conflicting scripts running for *each* possible embedder.
Standards & signals
- Specification: https://github.com/w3c/performance-timeline/pull/202
- Firefox: No signal
- Safari: No signal
- Web developers: No signals
- Tracking bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1401731
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=cross-frame-performance-timeline
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Cross-frame%20performance%20timeline
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Cross-frame%20performance%20timeline
- Baseline status: https://webstatus.dev/?q=Cross-frame%20performance%20timeline