How Profiles Work
A profile is essentially a saved snapshot of a browser’s user data directory. By default, each Hyperbrowser session uses a fresh user data directory to ensure isolation. When you create a profile and then use and persist it in a new session, Hyperbrowser saves that session’s user data directory. You can then attach the profile to future sessions.Create a Profile
Create a profile to store browser state. Optionally, give it a name to keep track of different profiles:Use a Profile in a Session
Attach a profile to a session to load and save browser state:Persist Changes
ThepersistChanges parameter controls whether session changes are saved. You will need to do this for the first time you use a new profile in a session so it can be used in subsequent sessions.
true- Persist changes made to the profile during the sessionfalse(default) - Use the profile as read-only; don’t persist changes made to the profile during the session
Once whatever changes to the profile have been made, the session should be safely closed to ensure that the profile is saved. After that unless the “persistChanges”: true option is passed to the session again, the profile will be immutable.
When using browser automation libraries like Playwright or Puppeteer, it is important to always use the default context in order for profiles to work properly.
Persist Network Cache
ThepersistNetworkCache parameter controls whether the browser’s network cache (HTTP cache) is persisted along with other profile data when persisting changes.
true- Persist network cachefalse(default) - Don’t persist network cache
Persisting Network Cache is currently available by request. Please contact us at info@hyperbrowser.ai or on our support chat to enable network cache persistence for your team.
Profile Login Example
Step 1: Login and Save to Profile
First, create a profile and perform a login. When the session ends, all cookies and browser state are automatically saved to the profile.Profiles can take a few seconds after the browser session is closed to completely save.
Step 2: Reuse the Saved Profile
After waiting a couple seconds, now use the saved profile in a new session. The browser will automatically load the saved cookies, so you’re already logged in without needing to authenticate again.- A new session is created using the same profile ID
- The browser automatically loads the saved cookies and state from the profile
- You can navigate directly to Hacker News and you’re already authenticated
- No login required - the session picks up right where you left off
This pattern is useful for scenarios where you need to:
- Avoid repeated logins across multiple automation runs
- Test authenticated user flows
- Manage multiple accounts with separate profiles
- Maintain session state over time
Forking Profiles
Forking lets you create an independent copy of a profile. This is useful when you want to start from an existing authenticated state but save new changes to a separate profile — for example, adding a second login without modifying the original. Useprofiles.fork() to create a standalone copy of a profile at any time. The original profile is never modified.
Managing Profiles
List Profiles
Retrieve all your profiles with optional pagination and filtering:Get Profile Details
Retrieve information about a specific profile:Delete a Profile
Delete a profile when you no longer need it:Read-Only Profile Usage
Load a previously persisted profile without saving any changes made during this new session:- Test workflows without affecting the saved state
- Run parallel sessions with the same profile safely
- Maintain a clean baseline profile for repeated use
By default,
persistChanges is set to false so you don’t have to explicitly specify it.Next Steps
Lifecycle Management
Manage session lifecycle
Recordings
Record session activity
Live View
Watch sessions in real-time
Extensions
Load browser extensions