Technical for web design agencies

Are JavaScript-heavy builds a risk for a web design agency's clients in AI search?

The short answer

Yes, when the content only appears after JavaScript runs in the browser. Many AI crawlers are widely reported to read raw HTML without running scripts, so a client-rendered site can look nearly empty to them even if Google indexes it. Server-side rendering or static generation for content pages removes most of the risk.

Why JavaScript matters more for AI crawlers

Googlebot renders JavaScript, though rendering can be delayed. Many AI crawlers, including those used for ChatGPT search, are widely reported not to run it. They fetch the HTML and read what's there. If a page's HTML is a near-empty shell that a script fills in later, those crawlers see little or nothing. ChatGPT also leans on search indexes, so a site that Bing struggles to render faces another hurdle. See whether AI crawlers can read JavaScript.

Builds most at risk

  • Single-page applications that render every page in the browser.
  • Headless builds where content is fetched from a CMS by the browser rather than at build or request time.
  • Content loaded on interaction, such as tabs, accordions or "load more" buttons that request content only when clicked.
  • Infinite scroll without real paginated URLs.
  • Hash-based routing, where pages share one URL and differ only after the "#".
  • Script-only navigation, where links are buttons with click handlers rather than real anchor links.

Sites built on mainstream platforms or frameworks with server-side rendering switched on are usually fine. The risk comes from how a build is configured, not from using JavaScript at all. A typical case is described in why some React sites are invisible to ChatGPT.

How to test a build

  • View the page source (not the inspector) and search for a sentence from the page.
  • Fetch the page with a command-line tool and read what comes back.
  • Disable JavaScript in the browser and reload.
  • Use the URL Inspection tool in Google Search Console to see the rendered HTML Google gets.

If the text, headings and links are in the raw HTML, crawlers that don't run scripts can read them.

How to fix it

Use server-side rendering or static generation for content pages; most modern frameworks support one or both. Keep interactive features, such as filters, calculators and animations, as an enhancement on top of HTML that already contains the content. Make sure every page has its own URL and that navigation uses real links. Hydration, where JavaScript takes over a page that was delivered as complete HTML, is fine. For a wider look at what to change in your build process, see building sites differently for AI search.

Related questions

More questions from web design agencies about AI crawlers and technical AI SEO

JavaScript, speed and access - questions every business asks

  • Can AI tools see content behind a login or paywall?Generally no. AI crawlers see what an anonymous visitor sees, so content behind a login, form or paywall is usually invisible to them and cannot be cited.
  • Do AI tools read PDFs on my website?They can. Google and Bing index public PDFs, and AI tools that search the web can read and cite them, as long as the text is real text rather than a scanned image.
  • Does website speed matter for AI search?Speed is unlikely to decide whether an AI tool recommends you, and no major AI company has said it is a factor.
  • What does a technical AI SEO audit check?A technical AI SEO audit checks whether AI tools can reach, read and correctly understand your website: crawler access in robots.txt and your CDN, whether content needs JavaScript to appear, indexing in Google and Bing, structured data accuracy and consistent business details.
  • Can a website redesign wipe out my visibility in AI answers?It can, if the new site drops or moves pages without redirects, rewrites clear service copy into something vaguer, loads content with JavaScript that crawlers cannot read, or ships with crawler blocks left over from staging.
Next questionWhich website platforms should a web design agency recommend for AI visibility?

Find out whether ChatGPT and other AI tools recommend your web design agency

Get an AI visibility audit showing whether ChatGPT and other AI tools recommend your web design agency when people ask for what you offer, which competitors they name instead, and how you compare.

Request my AI visibility audit