Overview
Session Replays are one of the most powerful features of Browserbase. It allows you to replay a Session to inspect the actions performed and network requests, page by page. To learn more about how Session Replays works, we’ll walk through a quickstart guide to understand how Session Replays can be involved in your development workflow. Let’s get started in viewing your first session replay immediately.Install the Browserbase SDK
Create your script to record a session and view the replay
Use your ideal framework to connect to a Browserbase session, navigate to the page you want to record, and then close the session.Run the script
Session Replay and Metrics
A replay of each Session is featured in the Sessions page. This replay is a capture of the webpage, not a video, and can be inspected with your Chrome DevTools.
- A high usage of memory or CPUs might result in longer runs and more billed minutes. Look at the logs or open a Live Session URL to pinpoint the root issue.
- In case of high proxy bandwidth usage, inspect the network requests using the Timeline described below.
Note that the replay length may not match the total session duration. This is
because session timing starts when the browser begins running, while the
replay recording only begins when the first page loads. The replay is a
reconstruction of the DOM using rrweb
events.
Timeline
The Timeline is simply a replay of the session that was ran. Like mentioned above, the replay is a reconstruction of the DOM using rrweb events.
DOM
The DOM tab shows a live representation of the webpage’s HTML structure during the session. You can inspect the Document Object Model DOM to see the exact state of elements, their attributes, and how they’re nested within the page.
Console Logs
Logs emitted by the Web Console API (ex:console.log()
), making debugging remote Sessions as easy as using your browser

browser-solving-started
browser-solving-completed
browserbase-keeping-connection-alive
Starting recording
[DOM] Updated style of [body]
or [Network] Request finished loading: GET "https://example.com/style.css"
Network Events
Network events (Network
), describing in detail any network requests and responses performed during Session
The Timeline also features logs emitted by the Web Console API (ex: console.log()
),
making debugging remote Sessions as easy as using your browser.

Logs can also be retrieved using the Sessions
API for automated processing.
HAR Recording
HAR (HTTP Archive) files capture detailed network activity during your browser sessions. You can record HAR files using Playwright’s tracing feature, which provides comprehensive network data that can be analyzed or replayed.Recording HAR Files
To record network activity as HAR data, use Playwright’s tracing functionality:Playwright
Analyzing HAR Files
The trace file contains network activity that can be viewed and analyzed:- View in Playwright Trace Viewer: Use
npx playwright show-trace trace-file.zip
to view the captured network activity - Extract Network Data: The trace file contains detailed network requests, responses, and timing information
- Replay Network Activity: Use the HAR data to replay network interactions for testing and debugging
Understanding HAR Data
HAR files capture:- Network Requests: All HTTP requests made during the session
- Response Data: Complete response bodies and headers
- Timing Information: Detailed timing for each network operation
- Performance Metrics: Network performance and loading times
When using Browserbase’s remote browsers, HAR files created with
routeFromHAR
are stored on the remote instance. Use tracing to capture network data locally for analysis.Session Logs
Session logs contain detailed information captured during a Browserbase session. This includes browser events, network requests, and other runtime data. These logs provide insights into what occurred during the session’s execution. To retrieve the logs of a session, you can use the Sessions API or thelogs.list()
method in the Browserbase SDK.

These logs retrieved using the Browserbase SDK are the same as the ones
featured in the Events tab of the Session Replay.
Session Recordings
Session recordings provide a representation of the session’s data, unique id, timestamp, and type of session. You can learn more about session recordings with events in the rrweb documentation.Retrieve Session Recordings
Let’s say you have a session ID and you want to retrieve the recordings for that session. You can do so by using therecording.retrieve()
method in the Browserbase SDK.
Integrating the Recording Player
Often times, you’ll want to integrate a recording player in your application. This is a simple process that can be done in a few steps. Since session recordings are a culmination of rrweb events captured during the session, you can integrate a recording player into your application to replay these events.
Using the rrweb Player Component
If using a frontend framework like Next.js, you can use therrwebPlayer
component for displaying the session replay in your application.
You can create a reusable component that accepts session recording events as props and renders the rrweb player:
Using an Iframe Container
For simpler integrations, you can embed the recording player in an iframe as well:The iframe approach requires you to host a separate page that initializes the
rrweb player. Make sure to handle proper session authentication and access
control.
Working with Session Events
You can use theevents
prop to pass session recording events to the rrweb player:
Multitab Workflows
Our browser recording feature is only designed for single tab workflows. In multi-tab environments, replays are unreliable as recording events can collide.For multi-tab recordings, we recommend capturing screenshots as you go, and stitching them together as a video or gif. Alternatively, we support multiple tab workflows with our Live View.
Debugging Replays
rrweb vs video
Session Replays aren’t video files. Rather, we use a history of the DOM to rebuild your session - like hydrating a session at replay-time. This lightweight approach is how we’re able to offer session replays for free. However, this live rebuild has caveats:- Some dynamic or obfuscated content (like iframes) might look different in the replay than during the session
- Skipping around the replay timeline might introduce glitches (we have playback speed controls to help)
- If the replay checks the geolocation, it will show the current IP address, not the IP address used during the session
- Multiple tabs aren’t supported
Debugging Options
If the session did not record properly, two options are:- Run the session again
- Use our Live View for real-time debugging
- Recordings are available about 30 seconds after session close
- Recordings are disabled on a few sites, like Opentable and the Salesforce family of sites
Questions or stuck? Contact us anytime at support@browserbase.com 🅱️