Client-Side vs Server-Side Rendering for AI Crawlers
Server-side rendering is the safer choice for AI visibility. In Vercel's late-2024 study, none of the major AI crawlers it tested ran JavaScript, with Google's Gemini and Apple's Applebot as the exceptions. A client-side page can therefore look empty to them. Put your important text in the HTML the server sends, and use client-side code for extras. Recheck for your own site.
- Rendering means turning code into the page a visitor sees. Server-side does this before the page is sent. Client-side does it in the browser.
- Vercel found OpenAI, Anthropic and Perplexity crawlers did not render JavaScript in late 2024. Recheck, because this can change.
- Google renders JavaScript, but still calls server-side or pre-rendering a great idea.
- Test with a plain fetch of your page. If your key sentences are missing, fix that first.
Is server-side rendering better than client-side rendering for AI crawlers?
Yes, for any content you want AI tools to read. Rendering is the step that turns a page's code into the text and images people see. With server-side rendering (SSR), your server builds the full page and sends finished HTML. With client-side rendering (CSR), the server sends a thin shell and the visitor's browser runs JavaScript to fill it in.
Vercel analysed AI crawler traffic and reported on 17 December 2024 that none of the major AI crawlers it tested rendered JavaScript. That list covered OpenAI's GPTBot, OAI-SearchBot and ChatGPT-User, Anthropic's ClaudeBot, PerplexityBot and others. Gemini and Applebot were the ones that did 1.
That study is almost two years old, so treat it as a baseline and test your own site. Still, the cost of being wrong is lopsided. Server-rendering takes engineering time up front. A blank page costs you every citation you might have earned.
How do the rendering options compare side by side?
Three terms cover most cases. Static rendering builds pages ahead of time at publish. Hydration sends server-built HTML first, then lets JavaScript make it interactive. Google lists server-side rendering, static rendering and hydration as its recommended options 3.
| Question | Client-side (CSR) | Server-side (SSR) | Static (SSG) |
|---|---|---|---|
| Who builds the page? | The visitor's browser | Your server, per request | A build step, ahead of time |
| What does a non-rendering bot see? | Often an empty shell | Full text and links | Full text and links |
| Is it safe for AI crawlers? | Risky for key content | Yes | Yes |
| Speed for the visitor | Slower first view, fast after | Fast first view | Fastest first view |
| Good for live data? | Yes | Yes | Only if rebuilt often |
| Cost and effort | Lowest to start | Needs a server or framework | Needs a build pipeline |
| Best fit | Logged-in apps, dashboards | Marketing, product and help pages | Blogs, docs, guides |
Which bots render JavaScript and which do not?
Google's crawler does. Google queues pages with a 200 status for rendering in headless Chromium, and a page may wait in that queue for a few seconds or longer 2. A Vercel and MERJ study of more than 100,000 Googlebot fetches on nextjs.org in April 2024 found every indexable HTML page it tracked was fully rendered. The median delay was 10 seconds and the 99th percentile about 18 hours. One site is a narrow base 4.
Apple says Applebot may render content in a browser, but if scripts or styles are blocked it may not render pages properly 5. The AI crawlers from OpenAI, Anthropic and Perplexity did not render JavaScript in the Vercel data 1. They did fetch JavaScript files: JavaScript made up 11.50% of ChatGPT crawler fetches and 23.84% of Claude crawler fetches. They downloaded those files but did not run them 1.
Microsoft adds a related warning. It says AI systems may not render hidden content such as tabs or expandable menus, and advises against putting key information only in images or PDFs 6. So even a server-rendered page can lose text if it sits behind a click.
What does a client-side page look like to an AI bot?
It looks like the code before scripts run. A typical single-page app sends a nearly empty HTML file with a div and a script tag. A person's browser then fetches data and builds the page. A bot that does not run scripts reads only the empty shell.
Below is an illustrative before-and-after for a pricing page. The numbers are made up for the example and are not from a real site.
- Client-side page, raw HTML received:
- <div id="root"></div> <script src="/app.js"></script>
- Text a bot can read: none.
- Server-side page, raw HTML received:
- <h1>Plans and pricing</h1> <p>The Starter plan costs $29 a month ...</p>
- Text a bot can read: the whole answer.
If Google renders JavaScript, why does this matter for AI?
Because AI answers come from several systems, not only Google's. Google still advises that server-side or pre-rendering is a great idea because it makes sites faster for users and crawlers, and because not all bots can run JavaScript 2. That is Google acknowledging the gap this page is about.
There is also a wait. Google's rendering is a second step after crawling, so client-side content can reach the index later than server-rendered content 2. For a news item or a price change, a delay of hours may matter.
One more Google limit applies to heavy pages. Googlebot crawls only the first 2 MB of a supported file, measured uncompressed, and each script or style file is fetched separately under the same cap 7. A very large HTML file with inline data can lose its tail.
Is dynamic rendering a good shortcut?
Only as a stopgap. Dynamic rendering means serving a pre-built version to crawlers and the normal version to people. Google calls it a workaround and not a recommended solution because it adds complexity and resource needs, and it recommends server-side rendering, static rendering or hydration instead 3.
Google says dynamic rendering is generally not cloaking, but serving different content to crawlers and users can be 3. If you use it, make sure the bot version matches what people see.
How can you test what AI crawlers see on your site?
Fetch the page without running scripts and look for your key sentences. The command below does that from a terminal. If the sentence appears in the output, a non-rendering bot can read it. If it does not, the content is added by JavaScript.
For Google specifically, use the URL Inspection tool or the Rich Results Test and read the rendered HTML. Google says that if content is missing there, it cannot be indexed 2. Our guide to checking whether AI bots can crawl your site adds log and robots.txt checks.
- curl -s https://www.example.com/pricing | grep -i "Starter plan"
- Match printed: the sentence is in the HTML.
- No output: the sentence is added by JavaScript. Fix before publishing more pages.
- If you get a challenge page or an error, your firewall may block curl; test with view-source: in a browser instead.
How do you move from client-side to server-side rendering?
Start with the pages that earn or answer: pricing, product, service, location and help pages. Leave logged-in screens as they are. Vercel's advice is to prioritise server-side rendering for critical content, and keep client-side rendering for non-essential features such as view counters and chat widgets 1.
Most modern frameworks, such as Next.js, Nuxt and Astro, can server-render or pre-build pages with a setting change per route. For a full walk-through, see how to make your site server-side rendered. When you finish, re-run the test above and check that links are real <a href> elements, which Google says it needs to find them 2.
Frequently asked questions
Do ChatGPT and Perplexity read JavaScript?
In Vercel's late-2024 study, OpenAI's and Perplexity's crawlers did not render JavaScript 1. They may have changed since, and the study did not test every product. Test your own pages with a plain fetch and do not rely on a bot running scripts.
Will server-side rendering improve my Google rankings?
Is a React site automatically bad for AI?
No. React can be server-rendered or pre-built, for example through frameworks such as Next.js. The risk comes from shipping an empty HTML shell, not from the library. Run the plain fetch test to see what you really send.
Does hiding text in tabs matter?
It can. Microsoft warns that AI systems may not render hidden content such as tabs or expandable menus 6. Put the answer in visible text, and use tabs only for extras that no one needs to quote.
Is dynamic rendering safe to use?
It is allowed but not recommended. Google calls it a workaround and points to server-side rendering, static rendering or hydration 3. Use it only as a temporary bridge, and keep the bot version identical to the user version.
Sources
- The rise of the AI crawler · Vercel (with MERJ)Opened October 20, 2026. Supports: Published 17 Dec 2024: none of the major AI crawlers rendered JavaScript except Gemini and Applebot; fetch shares (JavaScript 11.50% for ChatGPT, 23.84% for Claude); advice to prioritise server-side rendering for critical content.
- Understand JavaScript SEO basics · Google Search CentralOpened October 20, 2026. Supports: Render queue; server-side or pre-rendering is still a great idea; links need href; test with URL Inspection or Rich Results Test. Last updated 2026-03-04.
- Dynamic rendering as a workaround · Google Search CentralOpened October 20, 2026. Supports: Dynamic rendering is a workaround, not recommended; Google recommends server-side rendering, static rendering or hydration. Last updated 2025-12-10.
- How Google handles JavaScript throughout the indexing process · Vercel (with MERJ)Opened October 20, 2026. Supports: April 2024 analysis of more than 100,000 Googlebot fetches: all indexable HTML pages rendered; median delay 10 seconds; 99th percentile about 18 hours.
- About Applebot · AppleOpened October 20, 2026. Supports: Applebot may render content in a browser, but if scripts or styles are blocked it may not render pages properly.
- Optimizing Your Content for Inclusion in AI Search Answers · Microsoft Advertising (Bing)Opened October 20, 2026. Supports: AI systems may not render hidden content such as tabs or expandable menus; avoid key information only in images or PDFs.
- Googlebot · Google Search CentralOpened October 20, 2026. Supports: Googlebot crawls the first 2 MB of a supported file (uncompressed); each CSS or JavaScript resource is fetched separately under the same limit.