Large Session Recording Warning
In the Console, you may encounter the warning:“This session recording is too large to load.”This occurs when a session exceeds 50 MB in size. Unfortunately, once a session has been recorded at this size, it cannot be displayed or fixed retroactively. If you are consistently seeing this warning, here are a few steps you can take to reduce session sizes going forward:
- Disable Inline Stylesheets
When initializing theSessionReplayClient, setinlineStylesheettofalse. We generally recommend keepinginlineStylesheetset totrue, because it ensures recordings accurately reflect your original CSS even if you later update your styles. However, this setting often causes sessions to grow very large and is the most common source of bloat.
- Javascript
- React
-
Exclude Large Static Elements
If certain elements on your page are large but static (e.g., background images or videos), you can exclude them from session capture by adding therr-blockclass to theirclassName. This prevents those elements from being recorded and can significantly reduce session size. -
Reach Out for Assistance
If you continue to experience large sessions, feel free to reach out in Slack Community. A Statsig team member can review your session and provide tailored recommendations for your setup.