Fundamentals/Intermediate
Persistent Sessions
Reusing profiles and cookie states to maintain active authentications across browser runs.
Dependency Path
Requires:
Used By:
Environment Target
Compatibility: Chrome >= 110
Last Reviewed: 2026-07-18
Recipes: 10 (6 cookbook / 4 playbook)
Why It Matters
Reusing profiles and cookie states to maintain active authentications across browser runs.Also known as: persistent login, profile sessions, user data dir.
sessionspersistencestate
Common Problems
A session encapsulates a user's entire state: cookies, local storage, indexedDB, cache files, and browser configurations. Reusing sessions reduces server overhead and decreases bot detection rates.
Best Practices
- User Data Directory: Launch Chrome pointing to a dedicated folder containing the browser profile data.
- Graceful Shutdowns: Ensure Chrome writes session states to disk before terminating the process.
- Session Lock Bypass: Clear stale
.lockfiles from the Chrome profile directory before launching a daemon.
Example Recipes
+4 more recipes in the knowledge base