Stuck on the 'Checking Your Browser' Page: Clear the Gate
Your headless render hangs on a 'checking your browser' interstitial. See why plain JS rendering fails the check and how stealth_antibot clears it.
On this page
What the ‘Checking Your Browser’ Page Is Really Doing: A Fingerprint Gate, Not a Loading Screen
You fire up a headless render, wait for your selector, and nothing happens. The page title says “Checking Your Browser.” Thirty seconds later it still says that. Your first instinct is to blame the network, or the site, or your own timeout logic.
Don’t. That interstitial is not a loading screen. It is an active JavaScript challenge that runs a fingerprint check on whatever is executing it, and it deliberately loops — re-executing the challenge script over and over — until the renderer passes. If you hang there forever, the check is not slow. It is failing, repeatedly, on purpose.
Here is what a plain headless request to example.com actually receives instead of the page:
<!DOCTYPE html>
<html>
<head>
<title>Checking Your Browser</title>
<script src="https://challenge.example.com/challenge.js" async></script>
</head>
<body>
<div class="challenge-wrapper">
<p>Verifying you are a real browser. This can take a few seconds...</p>
</div>
<noscript>
<p>Please enable JavaScript and cookies to continue.</p>
</noscript>
</body>
</html>
Three things to notice. The title is set to the challenge text, not the site’s title. There is a single inline challenge script from a separate challenge domain. And there is a noscript fallback telling you JavaScript is mandatory — because the check is JavaScript. Your HTTP client can’t even participate in this conversation.
The request timeline makes the loop explicit. Watching network events on example.com from a stock headless context looks like this:
t=0.00s GET / -> 200, challenge interstitial HTML
t=0.31s GET challenge.example.com/challenge.js -> 200, execute check
t=2.40s POST challenge.example.com/verify -> 403, check failed
t=2.62s GET challenge.example.com/challenge.js -> 200, re-execute check
t=4.81s POST challenge.example.com/verify -> 403, check failed
t=5.03s GET challenge.example.com/challenge.js -> 200, re-execute check
...repeats indefinitely. The real page HTML never arrives.
No terminal state. No redirect to content. The challenge just keeps re-arming because the fingerprint it collects keeps coming back as “not a real browser.” If you want the background on how these systems collect those signals, Headless Browser Detection: What Test Pages Check covers the full signal surface.
Reproducing the Hang: A Plain Headless Render of store.example.com That Never Reaches the Product Grid
Before you change anything, prove you actually have this failure mode. A five-second check on a challenge page and a five-second check on a genuinely slow page look identical from the outside, and misdiagnosing one as the other wastes an afternoon.
Here is a minimal reproduction. Default headless context, no modifications, one wait:
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch() # stock headless, nothing patched
page = browser.new_page()
page.goto("https://store.example.com/", wait_until="domcontentloaded")
try:
page.wait_for_selector(".product-grid", timeout=30000)
print("grid appeared")
except Exception as e:
print(f"title at failure: {page.title()}")
raise
finally:
browser.close()
Run it. On a challenge-gated storefront you get:
TimeoutError: waiting for selector failed after 30000ms
title at failure: Checking Your Browser
That title line is the tell. If the title were the store’s real name and the grid just hadn’t hydrated yet, you’d be debugging a slow render. When the title is still the interstitial’s title thirty seconds in, the challenge never cleared — the loop from the previous section is still spinning.
One caveat worth stating: some challenges clear in two or three seconds and only appear to hang because your wait strategy is networkidle on a page that never goes idle. That’s a different bug. Measure before you conclude.
The Fingerprint Tells That Fail the Check: What a Stock Headless Browser Leaks
The challenge script inspects a known list of browser properties. A stock headless Chromium trips several of them simultaneously, and the challenge doesn’t need exotic signals — the basics are enough to fail you.
| Property | Plain headless value | Real Chrome value |
|---|---|---|
navigator.webdriver | true | false |
| User agent string | contains HeadlessChrome | Chrome/<version> |
navigator.plugins | empty array [] | 5 entries (PDF Viewer etc.) |
window.chrome | undefined | object present |
| WebGL vendor/renderer | Google Inc. (SwiftShader) / software string | vendor Google Inc. (Intel) etc. |
navigator.permissions.query | resolves inconsistently for notifications | resolves {state: 'denied'} consistently |
Any one of these is survivable. The challenge scores them together, and a stock headless context fails on at least four at once. navigator.webdriver alone — a flag the automation driver sets explicitly — is a hard reject on most challenge implementations.
Run this in your render context against example.com to audit yourself:
console.log("webdriver:", navigator.webdriver);
console.log("ua:", navigator.userAgent);
console.log("plugins:", navigator.plugins.length);
console.log("chrome obj:", typeof window.chrome);
const gl = document.createElement("canvas").getContext("webgl");
const dbg = gl.getExtension("WEBGL_debug_renderer_info");
console.log("webgl vendor:", gl.getParameter(dbg.UNMASKED_VENDOR_WEBGL));
console.log("webgl renderer:", gl.getParameter(dbg.UNMASKED_RENDERER_WEBGL));
navigator.permissions.query({name: "notifications"})
.then(r => console.log("permissions:", r.state));
If you see webdriver: true and plugins: 0, you have your answer. You can patch these one at a time with an init script — override navigator.webdriver, inject fake plugins, stub window.chrome. People do it. I’ve done it. It works until the challenge adds a signal you didn’t patch, which is roughly one release cycle. That whack-a-mole is exactly why I stopped patching and started paying for a maintained stealth layer. More on the trade-offs at the end.
Telling a Challenge Stall from a Slow Page: Detecting the Interstitial in Your Render Loop
A generic timeout tells you nothing. “Job failed after 30s” could mean a slow origin, a hung connection, or a challenge loop, and each of those has a different fix. Detect the interstitial explicitly, early, and log it as its own failure class.
The check is cheap: read the title, scan a couple of body markers, and look for a challenge-platform script URL, all within the first two seconds of navigation:
import re
CHALLENGE_MARKERS = [
"checking your browser",
"verify you are human",
"just a moment",
]
def classify_page(page) -> str:
title = (page.title() or "").lower()
body = page.inner_text("body").lower()[:2000]
scripts = page.eval_on_selector_all(
"script[src]", "els => els.map(e => e.src)"
)
challenge_script = any(
re.search(r"challenge|verify|captcha", s) for s in scripts
)
if any(m in title or m in body for m in CHALLENGE_MARKERS):
return "challenge_interstitial"
if challenge_script:
return "challenge_script_present"
return "content_or_slow"
Wire it into your navigation loop and the logs stop lying to you:
# genuine slow load -- the site is just heavy
2025-XX-XX 12:04:11 store.example.com/ state=content_or_slow grid_visible=false elapsed=31.2s
# challenge loop -- the render never had a chance
2025-XX-XX 12:06:48 store.example.com/ state=challenge_interstitial title="Checking Your Browser" elapsed=2.1s
Two seconds in, you already know which failure you have. That distinction is what lets the rest of the pipeline route correctly: slow pages get a longer timeout, challenge pages get escalated, and neither gets silently retried as if it were the other.
Clearing the Gate with stealth_antibot: A Drop-In Config That Passes the Check
Patching fingerprints by hand is a maintenance treadmill. The alternative is to let a maintained stealth engine do the render for you. The scrape API takes a stealth_antibot flag that swaps the plain headless context for one that presents a coherent, real-browser fingerprint — the properties from the table above line up with each other instead of contradicting each other.
Here is the plain-render request first, which reproduces the hang at the API level:
{
"url": "https://store.example.com/",
"use_js_render": true,
"formats": ["markdown"],
"js_wait_for": "selector:.product-grid"
}
And the drop-in change that clears it:
{
"url": "https://store.example.com/",
"use_js_render": true,
"stealth_antibot": true,
"formats": ["markdown"],
"js_wait_for": "selector:.product-grid"
}
The diff is one line:
"url": "https://store.example.com/",
"use_js_render": true,
+ "stealth_antibot": true,
"formats": ["markdown"],
"js_wait_for": "selector:.product-grid"
Same URL, same wait-for-selector semantics, same output format. The only change is the engine doing the rendering. Full call with auth:
curl -s -X POST https://api.finedata.ai/api/v1/scrape \
-H "Authorization: Bearer fd_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://store.example.com/",
"use_js_render": true,
"stealth_antibot": true,
"formats": ["markdown"],
"js_wait_for": "selector:.product-grid"
}'
One flag costs seven tokens per request on top of the five for JS rendering. That pricing matters and I’ll come back to it, because “just turn on stealth for everything” is the wrong default.
Verifying the Clear: Before-and-After Measurements on store.example.com
Don’t trust a single successful render. Challenges are probabilistic gates — a page that clears on attempt one can loop on attempt four. Verify with a repeatable measurement, and run it several times before you call the fix real.
Here is a small harness that runs each variant and records the numbers:
import time
import requests
API = "https://api.finedata.ai/api/v1/scrape"
HEADERS = {
"Authorization": "Bearer fd_your_api_key",
"Content-Type": "application/json",
}
def measure(payload: dict, label: str):
t0 = time.monotonic()
r = requests.post(API, headers=HEADERS, json=payload, timeout=180)
elapsed = round(time.monotonic() - t0, 2)
body = r.json()
print(f"{label}: status={r.status_code} "
f"elapsed={elapsed}s html_bytes={len(str(body))}")
return r
base = {
"url": "https://store.example.com/",
"use_js_render": True,
"formats": ["markdown", "rawHtml"],
"js_wait_for": "selector:.product-grid",
}
measure(base, "plain render")
measure({**base, "stealth_antibot": True}, "stealth_antibot render")
Run it enough times and the shape of the results is consistent. A typical before/after on store.example.com:
| Metric | Plain headless render | stealth_antibot render |
|---|---|---|
| Time to first HTML | ~1s (interstitial) | ~2s (real page) |
| Time to product grid | never — timeout at 30s | ~4s |
| Final page title | ”Checking Your Browser” | store’s real title |
| HTTP status | 200 (serving the challenge) | 200 (serving content) |
| Response HTML | ~2 KB challenge stub | full page, ~180 KB |
Note the trap in that table: the plain render returns 200. The challenge is not an error — it is a successful HTTP response containing a page that will never be your data. If your pipeline treats “status 200” as “success,” it is silently ingesting challenge stubs as if they were product pages. I wrote about exactly this failure mode in Your 200 OK Responses Are Actually Block Pages, and it is the single most common way challenge gates corrupt datasets.
The honest trade-off: stealth_antibot renders are slower per request than plain renders — you are running a heavier emulation for the first-HTML fetch, and that cost shows up in elapsed time. You are trading latency and tokens for correctness. For a page behind a challenge gate, that trade is obvious. For a page that isn’t gated, it is pure waste.
Staying Cleared at Scale: Session Reuse and Backoff for a store.example.com Crawl
Clearing the gate once is not the end of it. Crawl past page one and the challenge reappears, because each fresh render context starts the check from scratch. The fix is to keep the cleared context alive across requests.
The async scrape endpoint accepts a session_id — all requests carrying the same ID share one proxy exit IP and one warmed context. Combined with proxy_sticky, a category page and a product page fetched back-to-back ride the same clearance:
import requests
import uuid
API = "https://api.finedata.ai/api/v1/async/scrape"
HEADERS = {
"Authorization": "Bearer fd_your_api_key",
"Content-Type": "application/json",
}
session_id = str(uuid.uuid4())
def fetch(url: str, job_label: str) -> str:
payload = {
"url": url,
"use_js_render": True,
"stealth_antibot": True,
"formats": ["markdown"],
"js_wait_for": "selector:.product-grid",
"session_id": session_id,
"session_ttl": 1800,
"proxy_sticky": True,
}
r = requests.post(API, headers=HEADERS, json=payload, timeout=60)
r.raise_for_status()
return r.json()["job_id"]
cat_job = fetch("https://store.example.com/category/mens-jackets", "category")
prod_job = fetch("https://store.example.com/products/jacket-001", "product")
Both jobs share the session. The second one does not re-run the full challenge from a cold context, which cuts both latency and token spend per page.
Now the part most pipelines get wrong: what happens when the interstitial comes back anyway. Challenge clearance expires. IPs get re-evaluated. The gate will eventually re-arm mid-crawl, and your response to that moment determines whether you are a polite crawler or a hammer.
The rule I enforce: cap re-attempts, back off exponentially, and give up loudly.
import time
MAX_CHALLENGE_RETRIES = 3
BASE_BACKOFF_SECONDS = 30
def scrape_with_challenge_backoff(fetch_fn, url: str):
for attempt in range(1, MAX_CHALLENGE_RETRIES + 1):
result = fetch_fn(url)
if result.get("state") != "challenge_interstitial":
return result
backoff = BASE_BACKOFF_SECONDS * (2 ** (attempt - 1))
print(f"challenge re-armed on {url}; "
f"attempt {attempt}/{MAX_CHALLENGE_RETRIES}, "
f"backing off {backoff}s")
time.sleep(backoff)
print(f"GIVE UP: challenge never cleared for {url} "
f"after {MAX_CHALLENGE_RETRIES} attempts — route to dead letter")
return None
Three attempts, thirty seconds then sixty then one-twenty, then a dead-letter line instead of a silent failure. A hard cap is non-negotiable in my book. An uncapped challenge retry loop doesn’t just burn your tokens — it hammers the target with the exact traffic pattern its gate was built to punish, which gets your exit IPs flagged harder and makes every subsequent crawl worse. If you want the fuller treatment on replaying dead-lettered URLs safely, Dead-Letter Failed URLs, Then Replay Them Safely is the follow-up read.
Wrap-Up
The “Checking Your Browser” hang is not a performance problem, and no timeout tuning will fix it. It is a fingerprint gate failing your renderer on every loop iteration, forever, while returning HTTP 200 so your pipeline keeps believing nothing is wrong.
The sequence that works:
- Reproduce with a stock headless render and confirm the title stays on the challenge text.
- Audit the fingerprint tells —
navigator.webdriver, plugins,window.chrome, WebGL — so you know what is failing. - Classify stalls explicitly as
challenge_interstitialinstead of letting them land as generic timeouts. - Flip
stealth_antibot: trueon the render request — one field, same wait-for-selector semantics. - Verify with repeated before/after measurements, not a single lucky render.
- Reuse the cleared session across the crawl, and cap challenge retries with exponential backoff and a loud give-up line.
My opinionated defaults: stealth_antibot on gated targets only, never as a blanket flag — it costs seven tokens a request and adds latency, which is real money across a million pages. And treat every 200 response as suspect until you have checked the title, because the block page that looks like success is the failure mode that actually corrupts your data.
Related Articles
Your 200 OK Responses Are Actually Block Pages
A 200 status code doesn't mean you got the page. Detect challenge pages and interstitials hiding inside successful responses, then fix your pipeline.
TutorialYour Target Wants Special Headers: Send Them Through
Some pages only render for the right headers. Learn how to pass your own Accept-Language, Referer, and auth headers through a scraping API request.
TutorialSome URLs Hit an Anti-Bot Wall: Flip One Request Field
Some URLs sit behind an anti-bot wall. Detect the challenge pages, then re-fetch only those with the stealth_antibot field instead of arming every request.