Is JavaScript killing our AI visibility? AI crawlers seem to miss our dynamic content
Community discussion on how JavaScript affects AI crawling. Real experiences from developers and SEO professionals testing JavaScript rendering impact on ChatGP...
We built a modern React site with infinite scroll for our blog. Great user experience, but our content isn’t showing up in AI answers at all.
Google indexes it fine (after some work with SSR). But AI platforms seem to miss most of our content.
Our setup:
Questions:
Any frontend devs dealt with this?
Let me break down how different AI crawlers handle JavaScript:
AI Crawler JavaScript Support:
| Crawler | JS Rendering | Scroll Simulation | Wait Time |
|---|---|---|---|
| GPTBot | Limited/None | No | Minimal |
| Google-Extended | Good (like Googlebot) | No | Standard |
| ClaudeBot | Limited | No | Minimal |
| PerplexityBot | Varies | No | Limited |
| Common Crawl | None | No | None |
The core problem:
Infinite scroll requires:
Most AI crawlers fail at step 1 or 2.
Why SSR isn’t enough:
Your SSR serves the initial page. But infinite scroll content isn’t “initial” - it loads on interaction. SSR doesn’t solve the interaction dependency.
The fundamental issue:
Infinite scroll is fundamentally incompatible with current AI crawler capabilities. You need an alternative approach.
Recommended approaches (in order of AI-friendliness):
Option 1: Traditional pagination (most AI-friendly)
/blog/page/1
/blog/page/2
/blog/page/3
Option 2: Hybrid approach
<!-- Infinite scroll page -->
<link rel="canonical" href="/blog/page/1" />
<!-- Pagination always available -->
<nav>
<a href="/blog/page/1">1</a>
<a href="/blog/page/2">2</a>
</nav>
Option 3: Prerender for AI crawlers
Each option has tradeoffs. Option 1 is simplest and most reliable for AI. Option 2 preserves your UX while adding AI accessibility.
We went through this exact problem. Here’s our solution:
The hybrid approach implementation:
// URL structure
/blog // Infinite scroll (user default)
/blog/archive/1 // Paginated (crawler accessible)
/blog/archive/2
Key implementation details:
Sitemap includes only paginated URLs
Infinite scroll page loads same content
Internal links point to individual articles
robots.txt guidance:
# Let crawlers focus on individual articles
# Not the infinite scroll container
Sitemap: /sitemap.xml
Results:
Next.js specific approach:
Using getStaticPaths + getStaticProps:
// pages/blog/page/[page].js
export async function getStaticPaths() {
const totalPages = await getTotalPages();
const paths = Array.from({ length: totalPages }, (_, i) => ({
params: { page: String(i + 1) }
}));
return { paths, fallback: false };
}
export async function getStaticProps({ params }) {
const posts = await getPostsForPage(params.page);
return { props: { posts, page: params.page } };
}
Benefits:
Then add infinite scroll as enhancement:
This gives you the best of both worlds.
Adding prerendering as an option:
Prerendering services for AI crawlers:
You can detect AI crawler user agents and serve prerendered content:
// middleware
if (isAICrawler(req.headers['user-agent'])) {
return servePrerenderedVersion(req.url);
}
AI crawler detection:
const aiCrawlers = [
'GPTBot',
'ChatGPT-User',
'Google-Extended',
'ClaudeBot',
'PerplexityBot',
'anthropic-ai'
];
function isAICrawler(userAgent) {
return aiCrawlers.some(crawler =>
userAgent.includes(crawler)
);
}
Prerendering options:
Caution:
Not all AI crawlers identify themselves clearly. Some might be missed. This is a supplementary approach, not a replacement for proper pagination.
Testing methodology for AI crawler accessibility:
Manual tests:
Disable JavaScript test:
View source test:
curl test:
curl -A "GPTBot/1.0" https://yoursite.com/blog/
Automated tests:
Google Search Console:
Lighthouse audit:
What you want to see:
E-commerce perspective:
We have 10,000+ products with “load more” functionality. Here’s our solution:
Category page structure:
/category/shoes # First 24 products + load more
/category/shoes?page=2 # Products 25-48
/category/shoes?page=3 # Products 49-72
Implementation:
Initial page always has pagination links
?page= parameters are canonical
Sitemap includes all paginated URLs
Products have individual URLs
Result:
AI platforms cite our individual product pages, which they discover through the paginated category structure.
This has been incredibly helpful. Here’s my implementation plan:
Approach: Hybrid pagination
Phase 1: Add paginated routes (Week 1-2)
Phase 2: Update existing infinite scroll (Week 3)
Phase 3: Testing and validation (Week 4)
Technical implementation:
/blog → Infinite scroll (humans, canonical to archive/1)
/blog/archive/1 → Paginated (crawlers, canonical to self)
/blog/archive/2 → Paginated (crawlers)
/blog/[slug] → Individual articles (main content)
Key principles:
Thanks everyone for the detailed technical guidance.
Get personalized help from our team. We'll respond within 24 hours.
Track which of your pages are being discovered and cited by AI platforms. Identify crawling issues affecting your visibility.
Community discussion on how JavaScript affects AI crawling. Real experiences from developers and SEO professionals testing JavaScript rendering impact on ChatGP...
Community discussion on optimizing Single Page Applications for AI search engines. Real solutions for making JavaScript-heavy sites visible to ChatGPT, Perplexi...
Community discussion on JavaScript rendering by AI crawlers. Developers share experiences with React, Next.js, and other JS frameworks for AI visibility.
Cookie Consent
We use cookies to enhance your browsing experience and analyze our traffic. See our privacy policy.