Skip to content

Glossary

What is DOM recording?

DOM recording captures a page's document tree and every change to it instead of pixels, which is what makes session replay small, searchable and maskable.

Updated · 1 min read

DOM recording is a session replay technique that serialises the browser's document object model once, then records each subsequent mutation, input and scroll as a small event instead of capturing video.

Why it matters

A screen recording of a ten-minute session weighs megabytes and shows you pixels you cannot search. A DOM recording of the same session is a full snapshot followed by a stream of tiny diffs, so it is cheap to store, cheap to send from the user's browser and easy to inspect.

Because the recording is the document itself, text can be masked before it leaves the page, and it can be translated before playback. Neither is possible with a video. The trade-off is that the player must rebuild the page from the recorded tree, which is why the replay sandbox matters.

How AnyReplay handles it

AnyReplay's web SDK builds on rrweb, the open-source DOM recorder. Script bodies are replaced with a placeholder at record time, so your JavaScript never leaves your page, and passwords, payment fields and anything you mark with ar-mask are masked before an event leaves it. The recorder ships at 34.8 KB gzip. Read rrweb explained for how the snapshot and mutation stream fit together.

Start free — 1 project, 500 sessions a month

Install the snippet, record a session, and watch it back in your own language.