JavaScript rendering
Definition: JavaScript rendering is the step where a crawler runs a page's JavaScript to build its final content; Google does this in a separate rendering stage, but most AI crawlers read only the initial HTML.
Also called: client-side rendering, JavaScript SEO, server-side rendering
Updated
How Google handles JavaScript
Google says Googlebot processes JavaScript pages in three phases: crawling, rendering and indexing. Pages are queued for rendering, and a recent version of Chromium runs the scripts before the result is indexed (JavaScript SEO basics). So Google can usually see client-rendered content, though it may take longer and things can still fail, for example when scripts are blocked in robots.txt or an API call times out.
Why AI crawlers are different
Research shows that in Vercel’s December 2024 analysis of crawler traffic, none of the major AI crawlers it observed, including GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot and PerplexityBot, rendered JavaScript, while Gemini, through Google’s infrastructure, and Applebot did (Vercel). Content that appears only after scripts run may therefore be invisible to ChatGPT, Claude and Perplexity, even when Google indexes it without trouble.
How to check what crawlers see
- Use “view source” in the browser, not the element inspector. View source shows the HTML the server sent; the inspector shows the page after scripts ran.
- Fetch the page with
curland search for a sentence from the main content. - Compare the word count of the raw HTML with the rendered page. A large gap means the content depends on JavaScript.
The free audit checks whether the main text can be extracted without JavaScript and flags pages where it cannot.
Rendering approaches that work for everyone
- Server-side rendering or static generation, with JavaScript added on top for interactivity.
- Real
a hreflinks for navigation, so crawlers can follow them without running code. - Critical metadata, such as titles, canonical tags and structured data, in the initial HTML.
The website audit flags JavaScript-dependent content across a sample of pages.