Technical SEO

JavaScript Rendering and AI Crawlers: Can They See Your Content?

Do not assume AI crawlers run your JavaScript. Test the raw HTML with curl and view-source, then fix empty pages with SSR, static generation or prerendering.

AEO Vista TeamPublished Last updated 7 min read
Abstract illustration of an empty JavaScript shell versus a filled page for AI crawlers

For JavaScript rendering and AI crawlers, the safe assumption is that they read your raw HTML and may not run your scripts. Google documents that it renders JavaScript. OpenAI, Anthropic and Perplexity do not document it in the bot pages cited here. If your text only appears after JavaScript runs, test it and consider server-side rendering.

This article separates what vendors document from what you can verify yourself in two minutes. Facts are as of November 2026.

Can ChatGPT see JavaScript content?

Conceptual illustration of testing raw HTML with a terminal-like view-source window

The honest answer is that it is not documented. OpenAI's bot documentation describes the purpose and robots.txt behavior of GPTBot, OAI-SearchBot and ChatGPT-User, but it does not say whether those crawlers execute JavaScript. The same is true of the Anthropic and Perplexity crawler pages. They describe purposes, user agents and robots.txt behavior, not rendering.

Without a documented guarantee, treat client-rendered text as a risk. A page that shows a headline, a paragraph and a pricing table to a browser may show an empty <div id="root"></div> to a bot that only reads the HTML response. Do not rely on any third-party claim about a specific bot's rendering until you have tested your own pages. For the wider question of how ChatGPT reaches your site, see can ChatGPT read my website.

What does Google do with JavaScript?

Conceptual illustration of server-side rendering delivering a complete page to a crawler

Google is the documented exception. In its JavaScript SEO basics, Google explains that Googlebot fetches a URL, checks robots.txt, queues pages with a 200 status for rendering, runs the JavaScript in a headless Chromium when resources allow, and indexes the rendered HTML. It also says it will not render JavaScript from blocked files or on blocked pages.

Google still recommends server-side rendering or pre-rendering, noting that it makes sites faster for users and crawlers and that not all bots can run JavaScript. That last point is the one that matters for AI crawlers. Google's AI Overviews and AI Mode draw on pages that are indexed and eligible for snippets in Search, per Google's AI features page, so Google's rendering applies there. Other answer engines have their own crawlers and their own limits.

How do you test what AI crawlers see in raw HTML?

Conceptual illustration of prerendered static page snapshots ready for bots

You are looking for one thing: does the text you want cited exist in the first HTML response, before any script runs?

Method 1: view-source

In your browser, open the page and use view-source (Ctrl+U or Cmd+Option+U). Do not use the inspector's Elements panel. The Elements panel shows the DOM after JavaScript has run, which is exactly what you are trying to avoid. Search the source for a sentence from your main content. If it is missing, the content is injected by JavaScript.

Method 2: curl

Fetch the page without a browser and search for a known phrase:

curl -sL https://www.example.com/pricing | grep -i "your exact phrase"

To see the response as a bot might, send a bot-style user agent. This checks whether your server or CDN treats the request differently:

curl -sL -A "Mozilla/5.0 (compatible; OAI-SearchBot/1.4; +https://openai.com/searchbot)" \
  https://www.example.com/pricing -o page.html
wc -c page.html
grep -ci "your exact phrase" page.html

Check three things: the status code (add -i or -w "%{http_code}"), the size of the file, and whether your phrase appears. A 403 or a tiny file points to a firewall or bot rule rather than JavaScript. Spoofing a user agent from your own machine only tests how your server responds to that string; it does not prove the real bot receives the same thing, since a CDN may also check IP ranges.

Method 3: disable JavaScript

Turn JavaScript off in your browser's developer settings and reload. Whatever remains is roughly what a non-rendering reader gets. Navigation links, headings, body copy, prices and structured data should still be there.

What to check in the raw HTML

  • The main heading and body text of the page.
  • Internal links as real <a href> elements, not click handlers.
  • The <title>, meta description and canonical tag.
  • JSON-LD structured data, if you use it. See structured data for AI.
  • Answers to common questions, placed in HTML text rather than behind tabs or accordions that load on click. See answer-first content.
  • Content hidden behind a consent wall, covered in cookie banners hiding content from AI.

How do you fix a JavaScript-only site?

The fix is to make the server send the content in the first response. You have four main options, from least to most effort.

ApproachHow it worksBest for
Static site generation (SSG)HTML is built at deploy time and served as files.Blogs, docs, marketing pages that change rarely.
Server-side rendering (SSR)The server renders HTML on each request, then the browser hydrates it.Pages that depend on request-time data.
Incremental regenerationStatic pages are rebuilt on a schedule or on demand.Large catalogs that need freshness without full rebuilds.
Prerendering serviceA service renders your client app and serves the HTML snapshot, often only to bots.Legacy single-page apps you cannot rewrite.

Frameworks such as Next.js, Nuxt, SvelteKit and Astro support SSG or SSR. If you run a plain single-page app, adding a prerender step may be quicker than a rewrite. Whichever route you choose, make sure the bot-facing HTML matches what users see; serving materially different content to bots is a risk with search engines.

What about content loaded after the page?

Even on a server-rendered page, parts can load late: reviews, FAQs, product specs, tab content, and anything fetched from an API on click or scroll. If that text matters for answers, include it in the server response or link to a real URL that contains it. Lazy loading images is fine. Lazy loading the paragraphs you want cited is not.

Also check that your scripts and API endpoints are not blocked in robots.txt. Google notes it will not render JavaScript from blocked files, and the same logic is sensible for any crawler that does render. See robots.txt for AI crawlers for the rules to review.

Is client-side JavaScript rendering ever fine for AI crawlers?

Yes, for the parts of a page that do not need to be read by an answer engine: a dashboard behind a login, a configurator, an interactive chart. The rule is simple. Anything you want quoted, such as definitions, steps, prices, specifications and answers, should be in the HTML the server sends. Interactive extras can load afterward. A good test is to ask whether a visitor with JavaScript disabled would still learn what the page is about and find the main facts. If yes, a bot that skips scripts will too.

How do you confirm the fix worked?

  1. Re-run the curl command and confirm your key phrases appear in the response.
  2. View source on several templates, not just the home page: article, product, category and FAQ pages.
  3. Compare the byte size of the HTML before and after. An empty shell is usually only a few kilobytes.
  4. For Google, use the URL Inspection tool to view the rendered HTML Google sees.

None of this guarantees an answer engine will cite you. Server-rendered HTML removes one technical reason it could not read your page, and the rest is content quality.

Check your pages for rendering problems

To test this at scale, run a free AEO Vista audit. The content accessibility category looks at whether your key text is available in the HTML a crawler receives, and the ranked fix list tells you which pages to fix first.

  • JavaScript SEO
  • AI crawlers
  • SSR
  • prerendering
  • raw HTML

Be the source
AI quotes.

Every day, answer engines pick one site to cite. Fill in the blank below and find out what it takes to be that site.

Answer engine

Example question: which CRM should a small team use?

The best answer for this comes from .

Sources1yoursite.com2your-competitor.com

Free audit · about 2 minutes · no account needed