Blog

Which AI Crawlers Can Render JavaScript—and Which Cannot?

Most AI crawlers should not be expected to execute JavaScript reliably. If important page content appears only after hydration or a client-side API call, make sure a useful HTML version is available and test what crawlers actually receive.

The short answer: do not make JavaScript a prerequisite

AI crawlers do not form one consistent technical category. Some are simple HTTP fetchers. Some belong to search systems that may render pages in a separate pipeline. Some are browser-based agents that can execute JavaScript while completing a task. A crawler’s published user-agent name does not, by itself, tell you which of these behaviors applies.

The practical default is therefore conservative: assume that the first HTML response matters. Put the page’s primary answer, meaningful headings, internal links, canonical URL, and important metadata in HTML that arrives without requiring a click, a delayed script, or a successful client-side API request. JavaScript can enhance that foundation, but it should not be the only path to the content.

This is the same distinction covered in BatSignal’s guide to crawlable HTML versus SPAs: a page can work perfectly for a human using a modern browser while exposing very little to a basic fetcher.

Crawler access, JavaScript rendering, and citation are different questions

Teams often collapse several stages into the phrase “AI visibility.” They are related, but they are not interchangeable.

QuestionWhat it measuresWhy JavaScript matters
Can the crawler request the URL?DNS, TLS, server availability, robots.txt rules, status codes, and redirectsJavaScript usually has no role if the request is blocked before HTML is returned.
Does the response contain the content?The text and links present in the initial HTML responseThis is the safest format for simple fetchers and downstream processing.
Can a rendering system build the page?Whether scripts, APIs, assets, and hydration complete successfullyRendering may help, but it can fail because of timeouts, blocked resources, consent gates, or client errors.
Is the page present in a training or open-web corpus?Whether a dataset or crawler collected the page at a particular timeA page can be crawlable today but absent from an older corpus, or present in a corpus without being cited live.
Will an answer cite or recommend the page?Retrieval, ranking, answer generation, source selection, and model behaviorJavaScript access is only one prerequisite. It is not evidence of a citation or recommendation.

For a fuller framework, see the AI visibility guide and BatSignal’s methodology, which separate crawler access, content readiness, open-web coverage, training presence, and live answer visibility.

What the major crawler categories generally do

Specific implementations change, and a service can operate more than one crawler. The table below is a planning guide, not a permanent capability list. Verify behavior using your own logs and test pages rather than treating a user-agent label as proof.

Crawler or system categoryTypical planning assumptionWhat to provide
OpenAI collection and search crawlersDo not assume the ordinary fetch path will execute all page JavaScript. OpenAI has used separate crawler identities for different purposes, and search or browsing systems may have additional retrievalUseful initial HTML, valid robots rules, descriptive links, and stable content URLs. Review OpenAI’s current crawler documentation and your access logs.
Anthropic Claude crawlersPlan for basic fetching unless you have direct evidence of rendering in the relevant workflow. A browser-enabled Claude task is different from an indexing crawlerServer-rendered content, accessible navigation, and a clear HTML fallback. Do not confuse a user asking Claude to browse with routine corpus collection.
Perplexity and other AI search crawlersSearch products may use multiple retrieval and rendering components. The named bot may not represent every internal fetchMake the answer available in HTML, keep pages fast and public, and test both raw responses and observed crawler requests.
Googlebot and Google AI featuresGooglebot can render JavaScript in its broader indexing pipeline, but rendering is deferred, resource-dependent, and not a reason to ship an empty shellFollow search rendering fundamentals: crawlable links, indexable responses, stable content, and server-side or static HTML where feasible.
Browser agents and user-driven toolsThese systems can often execute JavaScript because they operate a browser, but they may have limited time, blocked automation, or difficulty with interactionsUse normal semantic HTML and avoid hiding the answer behind complex menus, consent flows, or scroll-triggered requests.
Training and archive crawlersMany collection pipelines prioritize predictable HTTP retrieval and may not reproduce a complete browser sessionPublish durable text in the initial response and understand that collection timing is separate from current live visibility.

Why client-rendered content is fragile

A single-page application is not automatically a problem. The risk comes from what the server returns before JavaScript runs. A minimal document containing only a root element and script tags gives a crawler little to work with if it does not render, if rendering times out, or if the application fails outside a full browser.

Common failure patterns include:

  • The server returns an empty <div id="root"> and puts the article text into a later API response.
  • The page title and meta description are changed only after hydration, while the initial HTML has generic metadata.
  • Internal links are created by click handlers or JavaScript routing rather than normal anchor elements.
  • The content request requires cookies, a consent decision, a token, or a browser-generated header.
  • Important sections appear only after scrolling, opening an accordion, submitting a form, or waiting for a timer.
  • A JavaScript bundle fails because of a Content Security Policy, an expired asset, a blocked third-party domain, or a framework error.
  • The page displays a loading state in the initial response and never exposes a useful fallback to non-browser clients.

These problems can also affect accessibility, link previews, caching, translation tools, and conventional search. Improving the HTML is therefore a robustness measure, not an attempt to exploit a particular AI system.

What an AI-ready HTML fallback should contain

The fallback does not need to reproduce every interactive feature. It needs to make the page’s purpose and substantive answer understandable without the application booting.

  • A specific, descriptive title and a useful meta description.
  • One clear H1 and a logical heading structure.
  • The main explanatory text, product or service details, and important qualifications in the response HTML.
  • Normal <a href> links to related pages, category pages, authors, documentation, and sources.
  • A canonical URL and appropriate robots meta directives.
  • Structured data where it accurately describes the visible page; see the guide to JSON-LD for AI discovery.
  • A sitemap that exposes indexable URLs, with consistent canonical and internal-link signals.
  • Visible author, date, organization, and contact or policy information where those facts matter.
  • A readable response even when CSS and JavaScript are disabled.

Do not fill the fallback with keyword-heavy duplicate text that users are not meant to see. The goal is parity: the no-script version should communicate the same core answer as the enhanced version, with appropriate changes only for interactive controls.

An llms.txt file can provide an additional navigational aid in some workflows, but it does not repair a page whose main content is inaccessible. Treat it as a supplement to HTML, robots.txt, sitemaps, and normal information architecture. BatSignal’s llms.txt guide explains that distinction.

A repeatable test for JavaScript-dependent content

You can test this without guessing which AI company uses which rendering stack. Start with a representative sample: your homepage, a high-value guide, a product or service page, a comparison page, and a few deep URLs.

  1. Fetch each URL with a plain HTTP client such as curl or a small script. Record status code, redirects, response size, title, headings, visible text, links, canonical URL, robots directives, and JSON-LD.
  2. Save the raw HTML. Do not inspect only the browser’s Elements panel, because that panel shows the post-JavaScript DOM rather than necessarily the server response.
  3. Load the same URLs in a controlled browser and compare the rendered text with the raw response. Identify content that appears only after hydration or an API request.
  4. Run the browser test with JavaScript disabled. Note whether the article, navigation, metadata, and links remain usable.
  5. Check network requests and timing. A page that needs several seconds or a third-party API to reveal its answer is more fragile than one that returns the answer immediately.
  6. Test important routes with a mobile viewport, a fresh session, no cookies, and blocked third-party scripts. This approximates conditions that differ from your own logged-in browser.
  7. Review server and CDN logs for crawler requests, response codes, blocked paths, unusual latency, and whether the requested URL received the same HTML as a normal visitor.
  8. Repeat after deployments. Rendering regressions often come from framework, routing, consent, or asset changes rather than from editorial updates.

A useful comparison is the text available at time zero versus the text available after rendering. If the answer to a user’s question is absent at time zero, mark the URL as JavaScript-dependent even if Chrome eventually displays it.

How to interpret crawler evidence

Access logs are valuable, but they require skepticism. A request with a familiar user-agent string is not conclusive proof that the request came from that organization; bots can impersonate one another. Conversely, the absence of a request does not prove that a service cannot render JavaScript. Collection may be infrequent, routed through another infrastructure layer, or controlled by a separate product identity.

Look for patterns rather than a single request:

  • Does the crawler receive a 200 response rather than a redirect loop, 403, 429, or soft error?
  • Does robots.txt permit the relevant path and its required assets where rendering is expected?
  • Does the server return the same substantive HTML to a clean crawler request and an ordinary anonymous request?
  • Are important CSS, JavaScript, API, or image resources blocked by robots rules or authentication?
  • Does the page remain available when query parameters, cookies, and browser headers are absent?
  • Are crawler requests failing because of rate limits, bot challenges, geofencing, or a slow origin?

For robots-specific checks, use the robots.txt and AI crawlers guide. Remember that robots.txt governs access instructions; it does not force a permitted crawler to execute JavaScript, and it cannot grant access to content hidden behind authentication.

A practical decision framework for site teams

The right implementation depends on your stack and publishing workflow, but the following sequence avoids most unnecessary debates about individual bots.

  1. Identify the pages that must be discoverable: core explanations, product pages, documentation, comparisons, and evidence pages.
  2. Inspect their raw HTML and classify each as HTML-complete, partially hydrated, or shell-only.
  3. Move the primary answer and important links into server-side rendering, static generation, or a reliable edge-rendered response.
  4. Keep JavaScript for filters, personalization, live data, and other enhancements that genuinely require it.
  5. Remove avoidable gates before the first meaningful content: cookie walls for public pages, interaction-only navigation, and API calls required for basic copy.
  6. Confirm that canonical URLs, headings, metadata, JSON-LD, sitemap entries, and internal links agree.
  7. Run the same checks after framework upgrades and major design changes.
Implementation stateRisk for non-rendering crawlersRecommended action
Full content in initial HTML; JavaScript enhances interactionsLowKeep the architecture, then monitor response codes, links, and regressions.
Core text in HTML, but metadata or some links appear after hydrationMediumMove critical metadata and discovery links into the initial response.
Short excerpt in HTML; full answer arrives from a public APIMedium to highRender the full primary answer server-side or provide a complete accessible fallback.
Empty application shell; all content requires JavaScriptHighPrioritize SSR, static generation, prerendering, or a non-JavaScript content route.
Content is public in theory but blocked by robots, auth, challenges, or rate limitsHighFix access and delivery first. Rendering work cannot compensate for an inaccessible response.

What this can and cannot improve

Making content available in HTML can improve the probability that a crawler retrieves, parses, and associates the page with its topic. It can also improve conventional search resilience and make audits more straightforward. It cannot guarantee that an AI system will train on the page, select it for retrieval, cite it in an answer, recommend the business, or send traffic.

Keep three records separate in your measurement plan: current crawler access, presence in a known open-web or training corpus, and live answer outcomes. A page can pass the first test and fail the second because the collection happened earlier. It can pass both and still not appear in an answer because retrieval and source selection are query-dependent. BatSignal’s guides on Common Crawl and training presence and measuring AI visibility cover these differences.

If you want a repeatable baseline across URLs, a BatSignal Visibility Scan is optional. It can help organize checks for crawler and robots access, HTML and metadata readiness, JSON-LD, sitemaps, llms.txt, open-web coverage, and selected buyer-intent visibility. Treat the result as a diagnostic snapshot, not a promise of citations, rankings, traffic, or leads.

The durable rule

Do not build your discovery strategy around the hope that an AI crawler will behave like Chrome. Build pages that return a complete, understandable answer in HTML, use JavaScript to enhance rather than conceal it, and verify the result with raw-response tests, no-script checks, and server logs.

FAQ

Do AI crawlers execute JavaScript on my website?

Some AI search and browsing systems may render JavaScript in parts of their retrieval or browsing pipelines, but you should not assume that every named crawler executes JavaScript. Many crawlers primarily fetch the initial HTML response. Important content should be available in server-rendered or static HTML.

Is a client-rendered React site invisible to AI crawlers?

Not necessarily. A React site can still be discovered if its initial HTML contains links, titles, descriptions, and useful content, or if the crawler renders the page. However, an empty HTML shell that depends on JavaScript for all content is more fragile and harder to test.

How can I tell whether an AI crawler can see my content?

Fetch the page with a normal HTTP client, inspect the raw response, review rendered output separately, and check server logs for crawler requests. Compare the raw HTML with the browser DOM and test important URLs with JavaScript disabled. This reveals whether content depends on hydration, delayed API calls, or user interaction.

Should I use prerendering or server-side rendering for AI visibility?

Use server-side rendering, static generation, or a reliable HTML fallback when practical. These approaches improve resilience for search engines, accessibility tools, link unfurlers, and AI crawlers. They do not guarantee citations or rankings, but they make the content easier to retrieve and interpret.