persistence
settings in the browsers.create()
method:
id
:
- If a browser with the specified
persistence id
is found, the existing browser will be returned. - If a browser with the specified
persistence id
is not found, a new browser instance will be created and assigned the specifiedpersistence id
for future reuse. - Reusing an existing browser restores its exact state and stealth configurations—stealth configs cannot be changed for an existing browser.
persistence id
can be any string. You can set it to an identifier in your system to match it to a user, environment, website, or something else.
Persisted browsers exist indefinitely until you delete them. See here for plan limits on persistence.
Use Profiles if your goal is to reuse authentication state (cookies, local storage) — especially across concurrent browsers. Persistence is best for human-in-the-loop workflows where the same browser instance needs to be resumed later.