SEO foundations

JavaScript rendering and AI crawlers

By Abhijay Tondak, Founder · Updated July 2, 2026 · 6 min read

The short answer

Many AI crawlers fetch your raw HTML and do NOT execute JavaScript, so any content injected client-side (rendered only after JS runs) can be completely invisible to them - meaning it can't be cited. The fix is to serve your important content in the initial HTML via server-side rendering or static generation, so it's present the moment a crawler fetches the page, regardless of whether it runs JS.

Key takeaways

  • Many AI crawlers read raw HTML and don't execute JavaScript.
  • Content injected client-side (after JS runs) can be invisible to them → uncitable.
  • Serve important content in the initial HTML (SSR or static generation).
  • Test by viewing the raw fetched HTML (curl / 'view source'), not the rendered DOM.
  • This is the most common technical reason citable content still isn't cited.

Why JS rendering breaks AI crawlability

When a crawler fetches your page, it gets the initial HTML the server sends. A browser then runs JavaScript to build the final page a human sees. But many AI crawlers don't run that JavaScript - they read only the initial HTML. So if your content only appears after JS executes (client-side rendering), those crawlers see an empty or skeletal page. Content they can't see, they can't cite.

This is one of the most common and overlooked technical reasons genuinely good content fails to earn citations: it's there for humans, but invisible to the crawler.

The fix: content in the initial HTML

The solution is to ensure your important content is present in the HTML the server sends, before any JavaScript runs. That means server-side rendering (SSR) or static generation - the page arrives complete. Then a crawler that doesn't run JS still sees your full content, and one that does run JS sees the same thing. Either way, you're citable.

How to test what crawlers actually see

Don't trust the rendered page in your browser - that's after JS runs. To see what a non-JS crawler sees, fetch the raw HTML: use 'view source' (not inspect/DevTools, which shows the rendered DOM), or a command-line fetch. If your key content, headings, and answer text aren't in that raw HTML, a non-JS crawler can't see them either.

  • 'View source' shows the initial HTML; 'Inspect' shows the post-JS DOM - use view source.
  • A command-line fetch (curl) shows exactly what a basic crawler receives.
  • Check that your answer, headings, and body text are all present in that raw HTML.

It doesn't require abandoning JS frameworks

You don't have to drop React/Vue/etc. Modern frameworks support SSR and static generation precisely so content ships in the initial HTML while you keep a rich JS app. The goal isn't 'no JavaScript' - it's 'important content present before JS runs'. Interactive enhancements can still be client-side; the citable content just needs to be server-rendered.

Frequently asked questions

Do AI crawlers run JavaScript?

Many don't - they fetch raw HTML and read only that. Some do, but you can't rely on it. Content that only appears after client-side JS runs can be invisible to non-JS crawlers, so it can't be cited. Serve important content in the initial HTML.

How do I know if my content is JS-dependent?

Fetch the raw HTML - use 'view source' (not DevTools 'Inspect', which shows the post-JS DOM) or a command-line fetch. If your answer, headings, and body text aren't in that raw HTML, a non-JS crawler can't see them.

What's the fix for client-rendered content?

Server-side rendering (SSR) or static generation, so content ships in the initial HTML before any JS runs. Then both JS and non-JS crawlers see your full content.

Do I have to stop using React/Vue?

No - modern frameworks support SSR and static generation so content ships in the initial HTML while you keep a rich JS app. The goal is 'important content present before JS runs', not 'no JavaScript'.

Put this into practice — free.

Get your free AI-visibility audit and see where engines find you today.

Free audit · public pages only · no credit card

Keep reading