Persist Session State
The Hyperbeam profile API allows you to persist session state including bookmarks, history, passwords, and cookies which can be loaded into another session at a later time. This allows you to resume sessions without requiring the user to open up web pages or authenticate again.
Want to jump into the code? See our persistence example.
Basic Usage
In order to save a session, the profile
parameter must be set to true
when
starting a Chromium session.
Example Request
After the session is created, the response object will contain a session_id
property that you must save
in order to load the session state again afterwards.
Example Response
In order to load and update a previous session, the profile
parameter must be set to the session_id
you would like to resume
when starting a Chromium session.
This will load the profile associated with <session_id>
and update its contents when the new session is terminated. Below is a code snippet that showcases a simple profile integration:
Advanced Usage
For more granular control, you can specify separate profiles to load and overwrite. This is useful if you wish to create a new profile from an existing profile, without altering the original.
How Do We Persist Sessions?
When profile
is set to true
, we encrypt and store the Chrome profile of the session in Amazon S3.
This Chrome profile is associated with the session_id
that was returned to you on session creation.
When profile
is set to a session ID, we look for a stored Chrome profile that corresponds to that session_id
, and decrypt and
load the Chrome profile if there is a match.
This results in bookmarks, history, cookies, and passwords being persisted.
Looking for more detailed examples? See our persistence example.