Learning center

What a session replay can show and what it cannot reproduce

Session replay tools record what a user's page looked like and rebuild it for someone else to watch. That answers "what did they see and click?" It does not run the application again, so it cannot answer "would it happen on my machine?" Know which question you have before you send a maintainer a replay link.

How DOM-based session replay works#

Most web session replay tools, including the open-source rrweb library that several products build on, work the same way:

  1. When recording starts, serialize the whole DOM into a snapshot.
  2. Record every later DOM mutation, scroll, mouse movement and input as an event with a timestamp.
  3. To replay, rebuild the snapshot in a sandboxed frame and apply the events in order.

The replay rebuilds the page's DOM. The page's own scripts do not run in it. rrweb guide

What that means for a maintainer#

QuestionSession replayPlaywright traceReproduction script
What did the user see, in order?YesYes, for the steps tracedOnly when run
Which element did they click?YesYesYes
Which request ran, and what did it return?Not in the DOM recording itself; some tools add network captureYesWhen run, against today's server
What did the console print?Only if the tool records console eventsYesWhen run
Does it happen again on another machine?No: nothing executesNo: nothing executesYes
Was it recorded from a real user's session?OftenRarelyNo

The last row is the replay's strength. It records real sessions that nobody planned to test, including the one where the bug first appeared. Use it to find the steps and the state. Then build something that executes.

Read a replay for reproduction clues#

Watch the replay for the details that written steps leave out:

  • The path into the page. Did the user arrive from a link with query parameters, the back button or a bookmark?
  • Input method. Typing, pasting and autofill can change what the page receives. Typed versus pasted text covers the clipboard case.
  • Other tabs and time away. A long pause, or the page losing focus, can mean a session expired or another tab changed shared state. Bugs that need two tabs.
  • The viewport. The replay usually records the window size. A layout bug at 1366 pixels wide may not show at 1440.

Write each one down as a step or a condition in the reproduction.

Masking changes what you see#

Replay tools mask inputs and text to keep personal data out of recordings. rrweb, for example, offers maskAllInputs, a CSS class that masks an element's text and a class that blocks an element from being recorded at all. A masked field shows asterisks or a placeholder, so the replay cannot tell you whether the user typed +49 30 1234 or 030/1234. If the bug depends on the value, ask for its shape: length, character classes and format, never the value itself. Report code points for text that fails.

Worked example: a button that a replay showed was covered#

This example is fictional. A user reports that the Save button on a settings page does nothing. Support finds the session in the replay tool.

The replay shows the user clicking at the button's position three times. It also shows a cookie consent banner, 48 pixels tall, sliding up from the bottom of the window two seconds earlier. At the user's window height of 720 pixels, the banner covered the lower half of the button. The developer's screen was taller, so the button sat above the banner.

The reproduction became one Playwright line, await page.setViewportSize({ width: 1280, height: 720 }), before the click. The replay found the condition; the script made it repeat.

Questions#

Can I replay a session replay in a different browser?

You can watch it in any browser, because the replay rebuilds the DOM. That does not test the other browser's engine, since none of the page's code runs during the replay.

Is a session replay safe to attach to a public issue?

Usually not. Even with masking, a replay can show names, addresses and account details in page text. Share a link with access control, or describe what you saw.

Why does the replay look slightly different from the real page?

Fonts, images and styles load from their URLs at replay time, and some may have changed or be blocked. Canvas, video and cross-origin frames need extra support and may be blank. Treat layout details in a replay as approximate.

Return to reproducing what someone else saw for the other layers a replay needs.

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading