Overview
Nook Browser provides comprehensive cookie management with complete isolation between profiles. Each profile maintains its own cookie storage, and the Cookie Manager gives you full visibility and control over stored cookies.Profile-based cookie storage
How cookies are isolated
Nook uses WebKit’sWKWebsiteDataStore to provide complete cookie isolation:
- Each profile owns a unique, persistent
WKWebsiteDataStoreidentified by the profile’s UUID - Cookies set in one profile are never accessible to other profiles
- Ephemeral (incognito) profiles use non-persistent stores that are destroyed on window close
Cookie storage is isolated at the WebKit level, ensuring even JavaScript running on websites cannot access cookies from other profiles.
Data store creation
On macOS 15.4+, Nook creates profile-specific data stores:Profile.swift:79-98, BrowserConfig.swift
Profile switching
When you switch profiles, the Cookie Manager updates its data store reference:- In-memory cookie cache is cleared
- New data store is loaded
- Cookies are reloaded from the new profile’s store
- Current profile ID is tracked for diagnostics
CookieManager.swift:26-38
Viewing cookies
Cookie information
The Cookie Manager provides detailed information for each cookie:- Name: Cookie identifier
- Value: Cookie content (truncated if > 100 characters)
- Domain: The domain that set the cookie
- Path: URL path scope
- Size: Total bytes (name + value)
- Secure: Whether the cookie requires HTTPS
- HTTP Only: Whether the cookie is inaccessible to JavaScript
- Same Site: Same-site policy (None, Lax, or Strict)
- Expires: Expiration date or “Session” for session cookies
CookieModels.swift:13-68
Grouping by domain
Cookies are automatically grouped by domain:- Domains are normalized (leading dots are removed for display)
- Each group shows cookie count and total size
- Groups are sorted alphabetically by display domain
- Third-party cookies (domain starting with
.) are identified
Cookie statistics
The Cookie Manager provides real-time statistics:- Total cookies: All cookies in the current profile
- Session cookies: Cookies without an expiration date
- Persistent cookies: Cookies with an expiration date
- Expired cookies: Cookies past their expiration date
- Total size: Combined size of all cookies in bytes
CookieManager.swift:196-215
Managing cookies
Clearing cookies
Clear all cookies
Use
deleteAllCookies() to remove all cookies from the current profile’s data store. This is useful for troubleshooting or privacy cleanup.Clear cookies for a domain
Use
deleteCookiesForDomain() to remove all cookies for a specific domain, including both first-party (exact match) and third-party (.domain) variants.Clear individual cookies
Use
deleteCookie() to remove a specific cookie by matching name, domain, and path.CookieManager.swift:76-98
Privacy-focused cleanup
Nook provides specialized cleanup operations for privacy-conscious users:Delete high-risk cookies
Removes cookies with privacy concerns:- Not secure AND not HTTP-only
- SameSite=None without Secure flag
- Very long expiration (> 1 year)
- Large size (> 4KB, potential fingerprinting)
CookieManager.swift:102-116, CookieModels.swift:71-102
Delete third-party cookies
Removes all cookies with domains starting with., which typically indicates third-party tracking cookies:
Delete non-compliant cookies
Removes cookies with compliance issues:- SameSite=None without Secure flag
- Missing security flags (Secure, HttpOnly)
- Size exceeds 4KB recommended limit
- Expiration exceeds 1 year (GDPR concern)
- Third-party cookies with SameSite=None
CookieManager.swift:118-132, CookieModels.swift:119-143
Comprehensive privacy cleanup
Performs a full privacy-compliant cleanup:
See:
CookieManager.swift:145-152
Cookie privacy assessment
Risk levels
Each cookie is automatically assigned a privacy risk level:| Risk Level | Indicators |
|---|---|
| Low | Secure + HTTP-only flags set, reasonable expiration |
| Medium | Missing one security flag or SameSite=None without Secure |
| High | Multiple security issues, large size, or very long expiration |
CookieModels.swift:71-102
Compliance issues
Nook identifies specific compliance problems:- SameSite=None requires Secure: Cookies with SameSite=None must be sent over HTTPS
- Missing security flags: Cookies should have Secure and HttpOnly flags when appropriate
- Size exceeds 4KB: Oversized cookies may indicate tracking or fingerprinting
- Expiration > 1 year: GDPR recommends shorter cookie lifetimes
- Third-party SameSite=None: Cross-site tracking cookies
Compliance assessment helps you identify cookies that may violate best practices or privacy regulations like GDPR.
Searching and filtering
Search cookies
Search across cookie properties:- Cookie name
- Domain
- Value
CookieManager.swift:154-163
Filter cookies
Apply filters to view specific cookie types:- All Cookies: Show everything
- Session Only: Cookies without expiration dates
- Persistent Only: Cookies with expiration dates
- Secure Only: Cookies with the Secure flag
- Expired: Cookies past their expiration date
- Third-Party: Cookies from cross-site domains
- High Privacy Risk: Cookies with significant privacy concerns
- Non-Compliant: Cookies with compliance issues
CookieModels.swift:207-237
Sort cookies
Sort cookies by:- Domain: Alphabetical by domain name
- Name: Alphabetical by cookie name
- Size: By total byte size (name + value)
- Expiration: By expiration date (session cookies first)
CookieManager.swift:169-194
Exporting cookies
You can export cookies to JSON format:- Uses ISO 8601 date encoding
- Pretty-printed for readability
- Includes all cookie metadata
- Exports current profile’s cookies only
CookieManager.swift:234-246
Technical implementation
Async cookie operations
Nook uses Swift concurrency to bridge WebKit’s completion-handler APIs:Data store synchronization
When switching profiles, the Cookie Manager:- Updates the internal
dataStorereference - Clears cached cookies and domain groups
- Optionally reloads cookies from the new store
- Logs the switch with persistence status
CookieManager.swift:26-38
Best practices
Regular cleanup: Periodically delete expired and high-risk cookies to maintain privacy and reduce tracking surface.
Review third-party cookies: Check which sites are setting cross-domain cookies and consider blocking or removing them.
Use profiles: Separate work, personal, and sensitive browsing into different profiles for maximum isolation.