Can AI crawlers read content rendered by JavaScript?
Often not. Googlebot renders JavaScript in a later step, but most AI crawlers do not document doing so, and Google itself notes that not all bots can run JavaScript. If your text only appears after scripts run, an AI crawler may receive an empty page. Serve the main content in the initial HTML with server-side rendering or static pages.
Single-page apps and client-side frameworks are everywhere, and in a browser they look fine. A crawler that only reads the HTML your server sends sees something else: a <div id="root"></div>, a few script tags and little or no text. For AI answers, that page has nothing to quote.
On this page
Why do AI crawlers miss JavaScript content?
Running JavaScript is expensive. A crawler has to download the scripts, execute them in a browser engine and wait for data to load. Google does this for Search: it crawls, queues pages for rendering, and renders them with headless Chromium when resources allow. Even so, Google recommends server-side rendering or prerendering because it is faster for users and crawlers, and notes that not all bots can run JavaScript.
OpenAI, Anthropic and Perplexity do not state in their crawler documentation that their agents execute JavaScript. Apple says Applebot may render pages in a browser. Without a clear statement, the safe assumption for AI crawlers is that they read the initial HTML only.
How do I check what a crawler receives?
Look at the raw HTML, not the rendered page. Browser developer tools show the DOM after scripts ran, which is not what a crawler gets. Use view-source, or save the raw HTML from the command line and search it:
curl -s -o page.html \
-A "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.4; +https://openai.com/gptbot" \
https://example.com/page
# Is a sentence from your main text in the raw HTML?
grep -c "a sentence from your main content" page.html
A result of 0 means the sentence is not in the HTML the server sent, so crawlers that do not run scripts will not find it. A quick look at the file tells the rest: a server-rendered article has its full text there; a client-side shell has an empty root element and a list of scripts.
Which pages are most at risk?
- Single-page apps built with React, Vue, Angular or Svelte that render everything in the browser.
- Pages that fetch their main text from an API after load, such as product details, prices or reviews.
- Content inside tabs, accordions or "load more" sections that is requested only on click.
- Pages behind a login, a paywall or a consent wall that the crawler cannot pass.
- Pages that set
noindexor the canonical URL only through JavaScript. Google warns that when it seesnoindexin the original HTML it may skip rendering entirely.
How do I fix JavaScript-only content?
The fix is to send the important content in the first response. Pick the lightest option your stack allows:
- Server-side rendering (SSR): frameworks such as Next.js, Nuxt, SvelteKit and Angular SSR render the page on the server and hydrate it in the browser.
- Static generation or prerendering: build the HTML at deploy time for pages that change rarely, such as articles, docs and landing pages.
- Progressive enhancement: put the text, headings, links, prices and JSON-LD in the HTML and use JavaScript only for interaction.
- Inline what matters: if tabs hide content, put all of it in the HTML and toggle visibility with CSS or script, rather than fetching it on click.
You do not have to convert a whole app at once. Start with the pages you want cited: articles, documentation, product and pricing pages. Account areas and dashboards can stay client-side, because they are behind a login anyway.
Avoid serving crawlers a different page from users based on their user agent. Rendering the same HTML for everyone is simpler to maintain and avoids any doubt about cloaking.
Do login, consent and paywall screens block AI crawlers too?
Yes. A crawler does not log in, does not click a cookie banner and does not solve challenges. Anthropic states its bots will not try to bypass CAPTCHAs. If a consent manager replaces the page with a full-screen overlay in the HTML, or redirects first-time visitors to a consent page, the crawler gets that instead of your content.
Make sure public pages render their content in the HTML regardless of consent state, with the banner as an overlay rather than a replacement. Keep pages you want cited outside of login walls, and check that a crawler is not redirected to a sign-in page.
How does AISeeWhy detect JavaScript-only pages?
AISeeWhy reads the initial HTML as each crawler receives it, without running scripts. When a page has almost no visible text but a framework root element and scripts, it reports a P1 finding that the content needs JavaScript. It also flags redirects that send crawlers somewhere other than the page a browser gets.
Frequently asked questions
Does Googlebot render JavaScript?
Yes. Google crawls the HTML, queues pages for rendering and renders them with headless Chromium when resources allow. Google still recommends server-side rendering or prerendering.
Do ChatGPT, Claude and Perplexity crawlers run JavaScript?
Their vendors' crawler documentation does not say so. Until a vendor states otherwise, assume the crawler reads the initial HTML and make sure your content is in it.
Is dynamic rendering for bots a good idea?
It works as a stopgap but adds a second rendering path to maintain. Server-side rendering or static HTML serves the same content to everyone and is the simpler long-term fix.
Does JSON-LD added by JavaScript count?
Google can read it after rendering, but crawlers that do not run scripts will not see it. Put JSON-LD in the initial HTML.
Sources
- Google Search Central: JavaScript SEO basics
- Apple: About Applebot
- OpenAI: Overview of OpenAI crawlers
- Anthropic: Does Anthropic crawl data from the web, and how can site owners block the crawler?
- Perplexity: Perplexity crawlers