Overview
Session snapshots allow you to preserve the complete state of a browser environment, including:- Filesystem state - Browser data, cookies, localStorage, sessionStorage
- Memory state - Faster restoration, but less reliable
- Authentication tokens - Logged-in sessions and credentials
- Browser extensions - Extensions and configurations
Quick Start
1
1. Save a Snapshot
After logging in, delete the session with snapshot saving enabled:
- JavaScript
- Python
- HTTPie
2
2. Restore from Snapshot
Create a new session that restores from the saved snapshot:
- JavaScript
- Python
- HTTPie
3
3. Use Authenticated Session
Your new session will have all authentication state restored automatically.
Snapshot Modes
There are three snapshot modes available:Memory
Fastest restoration
May be less reliable
Good for temporary state
May be less reliable
Good for temporary state
Filesystem
Most reliable
Preserves all browser data
Recommended for authentication
Preserves all browser data
Recommended for authentication
None
No snapshot saved
Default behavior
Session state is lost
Default behavior
Session state is lost
Common Use Cases
Preserve Login State
Maintain authentication across sessions
Save Browser Data
Preserve cookies, localStorage, and more
Restore Previous State
Restore from saved snapshots
Default Environments
Set up automatic restoration
Key Concepts
How Snapshots Work
Restoration Priority
When creating a session, the system uses this precedence:restore_from_session_id- Explicit session ID (highest priority)restore_default_environment_from_user_id- User’s default environment- Fresh session - No restoration (default)