```yaml
product: AlterLab
title: "Canvas & WebGL Consistency in Headless Browsers | AlterLab"
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
source_url: https://alterlab.io/answers/canvas-webgl-fingerprint-consistency-headless-browsers
```

# Keeping Canvas and WebGL Output Consistent in Headless Browsers

## Short answer

### Should a headless browser change its canvas and WebGL output on every request?

No. Randomising canvas and WebGL values per page load creates a profile no real device produces, which is itself an automation signal. Pick one coherent profile per session: GPU vendor, renderer, fonts, screen and user agent that agree with each other, and keep it stable. AlterLab manages this coherence for every browser-rendered request.

## Step by step

1. 1
   ### Choose one real device profile
   Start from a profile captured on real hardware: operating system, GPU vendor and renderer string, screen size, installed fonts and the matching browser version.
2. 2
   ### Keep every layer consistent
   The user agent, client hints, WebGL renderer, canvas output and font list must describe the same machine. A Windows user agent with a Linux GPU string is easy to flag.
3. 3
   ### Hold the profile for the whole session
   Reuse the same profile, cookies and exit IP for all pages in a session. Values that drift between page loads are a stronger signal than any single value.
4. 4
   ### Verify against a known-good baseline
   Compare each change with a baseline from a real browser before shipping it. A fix for one signal that changes another is a net regression.

## Example

Python

```
import requests

# AlterLab renders the page in a browser with one coherent device profile
response = requests.post(
    "https://alterlab.io/api/v1/scrape",
    headers={"X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={"url": "https://example.com/products", "render_js": "auto"},
)
print(response.json())
```

## Frequently Asked Questions

### Why is per-request randomisation worse than a fixed profile?

Real visitors keep the same hardware between page loads. A browser whose canvas hash or WebGL renderer changes on every request matches no real population of devices, so it stands out more than a common, stable profile.

### Which signals have to agree with each other?

User agent and client hints, platform, GPU vendor and renderer, screen and window size, timezone and locale, fonts and the TLS and HTTP/2 behaviour of the browser build. Each must describe the same device.

## Read the full guide

[Headless browser techniques: TLS, canvas and WebGL in depth](https://alterlab.io/blog/advanced-headless-browser-anti-bot-techniques-tls-canvas)

## Related answers

[Headless Browser Resource Usage Across Many Sessions](https://alterlab.io/answers/headless-browser-resource-usage-multiple-sessions)[Matching Request Headers to the Region of Your Exit IP](https://alterlab.io/answers/regional-headers-for-cross-border-scraping)

## Try it with AlterLab

Send a URL, get the page back as HTML, markdown or JSON. Rendering, proxy rotation and retries are handled for you.

[View API docs](https://alterlab.io/docs/api/rest)

## Your first scrape. Sixty seconds.

Up to 5,000 free requests — about 5,000 direct fetch, 500 managed sessions or 250 full browser rendering requests. No credit card. 
Just a POST request.

terminal

curl -X POST https://api.alterlab.io/v1/scrape \

-H "X-API-Key: YOUR_KEY" \

-H "Content-Type: application/json" \

-d '{"url": "https://example.com", "formats": ["markdown"]}'

[Start building free](https://alterlab.io/signin)

No credit card required · Up to 5,000 free requests (about 5,000 direct fetch, 500 managed sessions or 250 full browser rendering requests) · Balance never expires