Glossary
What is rrweb?
rrweb is the open-source library that records a web page's DOM and replays it. AnyReplay's browser SDK wraps it and adds masking, chunking and translation.
Updated · 1 min read
rrweb is an open-source JavaScript library that serialises a web page's DOM into a snapshot, records later mutations as events, and replays those events in a player.
Why it matters
Most modern session replay tools, commercial and self-hosted, sit on top of rrweb or a fork of it. Knowing how it works tells you what a replay can and cannot show: it records the document, not the screen, so canvas content, cross-origin iframes and video frames need special handling.
The event format is also what makes replay extensible. Because a recording is a list of typed events, you can filter them, mask them, translate them or analyse them without decoding a video stream. DOM recording explains the underlying idea.
How AnyReplay handles it
The @anyreplay/browser SDK wraps rrweb and adds what a product needs around it: input masking with a floor no option switches off, chunked upload of 200 events or 5 seconds, a per-visitor sampling rate and retries that back off through an outage rather than a circuit breaker that gives up. On the dashboard side, translation is applied to the rrweb event stream before replay, not to the rebuilt DOM, so seeking and restarting stay translated. The replay iframe never gets allow-scripts. For a longer tour, read rrweb explained.