JavaScript, speed and access

Can AI crawlers read websites built with JavaScript?

The short answer

Often not fully. Googlebot renders JavaScript, but many AI crawlers are widely reported to read only the HTML the server sends, so content that appears only after scripts run may be invisible to them. The safe fix is to make sure your important content is in the initial HTML, through server-side rendering or pre-rendering.

Why JavaScript causes a problem

A web page can be delivered in two broad ways. In the first, the server sends HTML that already contains the text, headings and links. In the second, the server sends a mostly empty page plus JavaScript, and the browser runs the script to build the content. To a person in a browser, both look the same.

A crawler that does not run JavaScript only sees the first version. If your service descriptions, prices or contact details are added by scripts, that crawler sees an empty shell.

Which crawlers render and which do not

Google documents that Googlebot renders JavaScript, though it may do so after a delay and some scripts can still cause problems. Bing also renders JavaScript to a degree.

The AI companies have said less. At the time of writing, OpenAI, Anthropic and Perplexity have not documented full JavaScript rendering for their crawlers, and independent testing has widely reported that the main AI crawlers fetch HTML without executing scripts. That may change, but the cautious assumption is that content which needs JavaScript to appear may not be seen by AI crawlers.

There is a partial safety net. Copilot draws on Bing, which renders JavaScript, and ChatGPT is widely reported to use Bing as one source, so some of your content may still reach them that way. But you cannot count on it, and the pages AI tools fetch directly when answering a question are likely to be read without scripts.

How to check your own site

The quickest test is to look at what the server sends before any scripts run. In a browser, use "view page source" rather than the inspect tool, and search for a sentence from your main content. If it is not there, a non-rendering crawler will not see it either. You can also turn off JavaScript in your browser settings and reload the page.

Check the pages that matter most: service or product pages, your about page and your contact details.

How to fix it

  • Server-side rendering, where the server builds the full HTML for each request
  • Static generation, where pages are built in advance as complete HTML files
  • Pre-rendering, where a service serves crawlers a fully rendered copy

Most modern frameworks support at least one of these. Is your React or single-page website invisible to ChatGPT covers framework-specific options, and what a technical AI SEO audit checks puts rendering alongside the other access checks. Once content is in the HTML, whether ChatGPT reads your website explains what it does with it.

Related questions

More questions about javaScript, speed and access

Next questionIs my React or single-page website invisible to ChatGPT?

Find out whether ChatGPT and other AI tools recommend your business

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

Request my AI visibility audit