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.