Do LLMs Read JavaScript? Why AI Crawlers Miss Your Content

tb

tobecited

Editorial team • 5 min read • Aug 11, 2026 • Updated Aug 12, 2026

Mostly, no. AI assistant crawlers — GPTBot, ClaudeBot, PerplexityBot — request raw HTML from your server and discard JavaScript; content dependent on client-side rendering never enters their pipeline. Googlebot is the exception: it renders JavaScript, and that rendered output feeds Google's AI features but no one else's.

That single difference determines whether an AI assistant can quote your prices, describe your product, or recommend you at all. What follows: measured behavior per crawler, a two-minute self-test, and fixes ordered by engineering effort — none requiring a rewrite.

Which AI crawlers execute JavaScript?

The most reliable public measurement is from Vercel and MERJ, who analyzed AI crawler traffic on their edge network in late 2024. Their study is unambiguous: OpenAI's and Anthropic's crawlers fetch .js files as raw text and discard them without execution; content injected at runtime never enters the model. The current lineup:

  • GPTBot and OAI-SearchBot (OpenAI, bot documentation) retrieve the server's HTML and do not execute JavaScript.
  • ClaudeBot (Anthropic, crawler documentation) fetches pages without a rendering pass.
  • PerplexityBot exhibited no JavaScript execution in the same dataset.
  • Googlebot runs a full rendering pipeline (Google's JavaScript SEO documentation) — and Google's AI Overviews inherit that rendered index.

These are observed behaviors at the time of measurement, not contractual guarantees. Crawler capabilities evolve, which is why the test in the following section belongs in a release checklist, not a one-off check.

How does an AI assistant read a page without a browser?

The pipeline is an HTTP GET request, not a browser session. The crawler fetches the URL, receives the raw HTML string from the server, strips navigation and boilerplate, and injects the remaining text into the model's context window. There is no DOM construction, no hydration, no fetch calls after load — rendering at web scale in a headless browser costs orders of magnitude more than plain retrieval, and the measurements above confirm the major AI crawlers do not incur that cost.

The consequence is binary: any fact present in the initial HTML response — a price in the markup, a product description, an FAQ answer — is visible to the model. A fact that a React, Vue, or Angular application fetches from an API and injects after load never occurred from the model's perspective.

How do I check what AI actually sees on my site?

Two minutes, no tooling to install:

  1. Request a revenue page as a crawler would and grep the response for a critical fact — a price, a product name, a service area: curl -s https://yourdomain.com/pricing | grep '\$'
  2. Alternatively, open the page in a browser, disable JavaScript in developer tools, and reload. The content remaining on screen approximates what a non-rendering crawler sees.
  3. Repeat for every page that earns revenue: home, pricing, product pages, and any page you want an AI assistant to quote.

If the searched fact is absent from the raw response, no AI system that skips rendering can cite it — irrespective of how polished the page appears in a browser.

What is the fix — SSR, SSG, or prerendering?

Three standard options, in rising order of infrastructure involvement:

  • Static site generation (SSG) pre-builds pages to HTML at deploy time. It is the least expensive to serve and the most reliable for content that changes on deployment — marketing pages, documentation, blog posts.
  • Server-side rendering (SSR) constructs the HTML per request, suiting content that varies per user or per hour.
  • Prerendering retrofits an existing single-page application: a service or middleware detects bot user agents and returns a rendered HTML snapshot, leaving the client-side application untouched.

A full application rewrite is rarely necessary. Hybrid frameworks — Next.js, Nuxt, SvelteKit — allow rendering mode per route, so the practical step is selective: server-render the pages that carry your facts, while keeping the interactive app client-rendered. The dashboard behind authentication can remain a pure SPA indefinitely; no legitimate crawler accesses it anyway.

Rendering mode also decides the fate of your structured data. A JSON-LD block injected by a script after load is discarded along with the rest of the JavaScript, so schema markup meant for AI has to arrive in the server response like every other fact on the page.

Are single-page apps completely invisible to AI?

Not completely — the accurate answer distinguishes two channels. Model training data originates from bulk crawls that do not render, so a client-only site contributes little. Live retrieval is more permissive: AI search products rely on established search indexes, and if Google or Bing rendered and indexed your content, an assistant can still surface facts about you at one remove.

Relying on second-hand visibility is a poor strategy. It depends on another party's rendering budget and refresh cadence, while the crawlers that fetch your pages directly at query time — the ones covered in the measurements — still encounter an empty shell. Server-rendered HTML places your facts in every channel simultaneously; a curated llms.txt file on top gives AI readers a concise summary of what matters.

Frequently asked questions

Does GPTBot execute JavaScript?

No. Measurements from Vercel's network show GPTBot fetches JavaScript files but does not execute them — it processes only the server-returned HTML. Content injected by scripts after page load is invisible to it.

Do Google AI Overviews see JavaScript content?

Generally yes. AI Overviews are constructed from Google's search index, and Googlebot renders JavaScript prior to indexing. However, that rendered view is exclusive to Google — assistants from OpenAI, Anthropic, and Perplexity fetch your raw HTML directly and receive none of it.

Do I need to rewrite my React site?

No. React is not the issue — client-only rendering is. Migrating public pages to Next.js SSR or SSG, or placing a prerendering layer in front of the existing application, delivers complete HTML to crawlers while keeping your components unchanged.

See your site the way AI sees it

The curl test above tells you whether your facts are machine-readable. It cannot answer what AI does with them: when a buyer asks ChatGPT or Claude for the best option in your market, which brands are returned? Run the free audit — it poses real buyer questions to AI assistants, shows exactly who they name, and returns ready-to-paste fixes for what is missing, from server-rendered facts to a proper llms.txt. Three minutes to a verifiable answer. The other half of that question — what to ask, and how to score what comes back — is in how to check if AI mentions your brand.

#JavaScript#AI crawlers#SSR#technical SEO