Surfd

Do AI crawlers execute JavaScript?

Most AI crawlers do not reliably execute JavaScript. They read the raw HTML your server returns, so any content that only appears after client-side JavaScript runs is often invisible to them. This is the single most common reason a page is invisible to AI: it looks fine in a browser, but the crawler receives an empty shell. Server-rendering or static generation puts the content in the HTML, where the engines can read it.

Why this trips people up

A modern single-page app renders in the browser. To a person it looks complete. To a crawler that does not run JavaScript, the same page is nearly empty, because the real content is assembled by code that never runs.

The fix is to send the content in the initial HTML through server-side rendering or static generation, so the page is complete before any JavaScript runs.

How to check

View the page source, or disable JavaScript in your browser, and see how much real text remains. If it is nearly empty, an AI crawler sees the same emptiness. A crawlability checker can confirm this in seconds.

Frequently asked

Does Google run JavaScript?

Googlebot can render JavaScript, though not instantly and not for free. Many AI crawlers do far less, so relying on client rendering is risky if you want to be read by assistants.

How do I fix a JavaScript-only site?

Serve the content in the HTML using server-side rendering or static generation. Frameworks make this straightforward, and it helps human visitors and search too.

See where you stand

Surfd measures how the assistants actually describe you, scores your discoverability, and drafts the fixes. Free to start.

Related