NEWStandard createTask and in.php APIs. Change the address and you are connected.View API docs
GATESOLVER

Glossary

Headless browser: a full browser with no window

A headless browser runs a real browser engine (parsing, JavaScript, layout, network) without drawing anything on screen, and a script controls it instead of a person.

What headless means

A normal browser has two halves: the engine that loads and runs pages, and the user interface that shows them. Headless mode keeps the engine and drops the interface. Chrome, Chromium, Firefox and WebKit can all run this way. The page still executes every script, sets cookies, makes network calls and builds a DOM, so for most purposes it behaves like a visible browser. You control it through an automation library such as Playwright, Puppeteer or Selenium.

Where it is used

  • End to end testing: clicking through signup and checkout flows in CI.
  • Screenshots and PDFs: rendering pages to images or documents on a server.
  • Scraping dynamic pages: sites that build content with JavaScript (see JavaScript rendering).
  • Monitoring: checking that a public page loads and shows the right content.
  • Automation: filling forms in internal tools, part of many RPA setups.

The cost

A browser is heavy compared with an HTTP client. Each instance takes hundreds of megabytes and real CPU time to run scripts and layout. A plain request might fetch a page in a fraction of a second; a browser may need a few seconds, plus images, fonts and trackers unless you block them. Use a browser when you need it (JavaScript, complex interactions, the first pass through a challenge) and plain HTTP for the rest.

Why sites can tell

Headless browsers leave traces. Older Chromium headless mode had a distinct user agent string and missing features; the newer headless mode is much closer to regular Chrome, but automation still shows through navigator.webdriver, protocol side effects, missing GPU details, unusual screen sizes and timing. Bot management scripts check many of these at once (see headless browser detection). The result is often a challenge rather than a block.

Handling challenges in a headless session

When a widget appears, you can solve it outside the browser and inject the answer. Read the site key from the page, send a token task, and when the token comes back, write it into the expected field or call the page's callback, then submit.

// Puppeteer style: put a solved Turnstile token into the form
await page.evaluate((answer) => {
  const field = document.querySelector('[name="cf-turnstile-response"]');
  if (field) field.value = answer;
}, solvedToken);
await page.click("form [type=submit]");

Expect the Turnstile answer under 3 seconds from a Cloudflare Turnstile task. For a full Cloudflare challenge page, a challenge task returns a cookie and user agent that you set in the browser context, from the same proxy the task used.

Keeping browsers lean

Block images, media and third party trackers through request interception when you only need text; pages load faster and use less bandwidth. Reuse one browser across many pages and open a fresh context per job instead of launching a new process each time. Close pages you are done with, because open tabs keep their memory until closed.

Headed for debugging

When something fails only in automation, run the same script with the window visible and slowed down. Seeing the page often explains in seconds what logs could not. Record a trace or video in CI so failed runs can be replayed.

Common questions

Is a headless browser different from a real browser?

It is the same engine without the window. Pages run the same scripts, though small differences can reveal automation.

Which browsers support headless mode?

Chrome and Chromium, Firefox and WebKit can all run headless through common automation libraries.

Why is my headless scraper slow?

Browsers load scripts, images and fonts and run layout. Block unneeded resources or switch to plain HTTP where possible.

Can a headless browser pass a CAPTCHA by itself?

Not reliably. Solve the widget with a task and inject the token, or set the clearance cookie for challenge pages.

When should I run with a visible window?

While debugging, so you can watch what the page does and spot overlays, consent banners or unexpected redirects.

Keep reading