When enabled, the session replay feature might not display replay data for iframe content. This limitation results from the session replay's behavior in iframe scenarios, which varies based on the iframe's origin and the browser agent's placement.
Assume a webpage contains a top-level window and a child iframe
. The session replay behaviors, based on the placement of the browser agent, are as follows:
- Same-origin iframes:
- With the browser agent in the top-level window, session replay records both the window and the
iframe
content. - With the browser agent solely in the
iframe
, session replay records only the content within theiframe
. - With the browser agent in both the top-level window and the
iframe
, session replay records each context independently, resulting in two distinct sessions.
- With the browser agent in the top-level window, session replay records both the window and the
- Cross-origin iframes:
- With the browser agent in the top-level window, session replay captures only the window content; the
iframe
content will not be visible in the replay. - With the browser agent in the iframe, session replay captures only the
iframe
content.
- With the browser agent in the top-level window, session replay captures only the window content; the
Limitations:
- Session replay does not support
<frame>
elements.