Stack Depth Protection
JavaScript recursive stack depth is a privacy-relevant signal. BotBrowser controls stack depth values through the
--bot-stack-seedflag.
Prerequisites
- BotBrowser installed. See Installation Guide.
- A profile file (
.encfor production).
Overview
JavaScript recursive call stack depth is a privacy-relevant signal that varies by platform and cannot be controlled through JavaScript injection. BotBrowser protects this surface through the --bot-stack-seed flag (ENT Tier2).
Quick Start
chromium-browser \
--bot-profile="/path/to/profile.enc"Start with this launch to establish a clean baseline before adding extra overrides.
How BotBrowser Controls Stack Depth
The --bot-stack-seed flag provides three modes of stack depth control:
| Value | Behavior |
|---|---|
profile | Use the exact stack depth values stored in the profile, matching the reference device. |
real | Use the native stack depth of the host system. Useful when running on the same platform as the profile target. |
<integer> (1-UINT32_MAX) | Per-session depth variation. Each seed produces a different but stable value. Same seed = same depth across sessions. |
Profile Mode
chromium-browser \
--bot-profile="/path/to/profile.enc" \
--bot-stack-seed=profileReal Mode
chromium-browser \
--bot-profile="/path/to/profile.enc" \
--bot-stack-seed=realSeed Mode
chromium-browser \
--bot-profile="/path/to/profile.enc" \
--bot-stack-seed=12345Coverage Across Contexts
BotBrowser controls stack depth across all three execution contexts:
- Main thread: The primary JavaScript execution context
- Web Workers: Background thread contexts
- WASM: WebAssembly execution stack
The controlled values maintain realistic ratios between contexts, matching what the target platform would produce.
Common Scenarios
Keeping profile-consistent depth across hosts
Use --bot-stack-seed=profile when your profile should stay aligned across macOS/Linux/Windows deployment hosts.
Controlled per-session variance
Use integer seed mode (--bot-stack-seed=12345) to keep runs reproducible per seed while avoiding one fixed depth for every session.
Verifying multi-context behavior
Compare main-thread and Worker depth together when validating changes. A realistic ratio between contexts is often more important than one absolute number.
Effect Verification
To verify protection is active:
- Launch BotBrowser with a profile and visit a fingerprint testing site such as BrowserLeaks or CreepJS .
- Confirm that the reported stack depth values match the profile configuration, not the host machine.
- To verify reproducibility, launch two sessions with the same
--bot-stack-seedand confirm that the stack depth output is identical across main thread, Web Workers, and WASM contexts.
Troubleshooting / FAQ
| Problem | Solution |
|---|---|
| Stack depth is lower than expected on all contexts | Confirm --bot-stack-seed mode is what you intended (profile, real, or integer seed). |
| Main thread and Worker depths look inconsistent | Re-check that context setup and runtime flags are applied before page scripts execute. |
| Depth varies across sessions unexpectedly | Avoid mixing seed mode and real mode between runs. Keep a fixed seed for reproducible validation. |
Next Steps
- Performance Fingerprinting. Control timing-based fingerprint signals.
- CPU Core Scaling Protection. Constrain Worker parallelism to match claimed core count.
- CLI Flags Reference. Complete flag documentation including
--bot-stack-seed.
Related documentation: Advanced Features: Stack Depth Control | CLI Flags
Legal Disclaimer & Terms of Use • Responsible Use Guidelines . BotBrowser is for authorized fingerprint protection and privacy research only.