Skip to content
Inicio

/

Glossario

/

Navegador

/

User Agent

Navegador

2 min de leitura

O que e User Agent?

A user agent is a string that browsers send with every HTTP request identifying the browser type, version, and operating system, used by websites to serve appropriate content and detect automated traffic.

What is a User Agent?

A user agent is a text string included in the HTTP headers of every web request that identifies the client making the request. For web browsers, the user-agent string typically includes the browser name and version, the rendering engine, and the operating system. For example: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36.

User Agents in Browser Automation

User-agent strings are relevant to browser automation in several ways:

  • Bot detection: Websites check user-agent strings to identify known automation tools. Default headless browser user agents often include telltale identifiers like "HeadlessChrome" that trigger blocking.
  • Content variation: Some websites serve different content based on the user agent — mobile layouts for mobile browsers, simplified versions for older browsers, or blocked pages for known scrapers.
  • Spoofing: Automation tools can set custom user-agent strings to mimic specific browsers and operating systems, reducing the chance of detection. However, the user agent must be consistent with other browser fingerprint signals.
  • User Agent Best Practices for Automation

  • Use a current, real browser user-agent string that matches the browser engine your automation tool uses
  • Ensure the user agent is consistent with other fingerprint signals (screen resolution, platform, WebGL renderer)
  • Rotate user agents across sessions if making many requests to avoid pattern detection
  • Avoid using obviously fake or outdated user-agent strings that flag requests as suspicious
  • Por Que Isso Importa

    The user-agent string is one of the first signals websites check when evaluating incoming requests. An incorrect or suspicious user agent can immediately flag automated traffic, resulting in blocked requests, CAPTCHA challenges, or served honeypot content that returns misleading data.

    Como a Autonoly Resolve

    Autonoly configures Playwright browser contexts with realistic, up-to-date user-agent strings that match the underlying browser engine. The platform ensures consistency between the user agent and other browser fingerprint properties to minimize detection risk.

    Saiba mais

    Exemplos

    • Setting a Chrome user-agent string on a Playwright Chromium instance to avoid HeadlessChrome detection

    • Rotating user agents between sessions to prevent pattern-based blocking on high-volume scraping tasks

    • Matching the user agent to a mobile browser to access a site's mobile-optimized content for extraction

    Perguntas Frequentes

    Using an incorrect user agent can lead to several problems: the website may serve content designed for a different browser or device, bot detection systems may flag the request due to inconsistencies between the user agent and other browser signals, or the request may be blocked entirely if the user agent matches a known bot pattern.

    Yes. Sophisticated bot detection systems cross-reference the user-agent string with other browser properties like the navigator.platform value, available browser APIs, rendering characteristics, and TLS fingerprints. If the user agent claims to be Chrome on Windows but the browser fingerprint reveals Linux or missing Chrome-specific APIs, the inconsistency can trigger detection.

    Pare de ler sobre automacao.

    Comece a automatizar.

    Descreva o que voce precisa em portugues simples. O agente IA da Autonoly cria e executa a automacao para voce -- sem codigo.

    Ver Funcionalidades