Modern AI search tools like ChatGPT and Perplexity generally can’t execute JavaScript, which means they often miss any content that isn't visible in the initial HTML response. So why do pages that rely heavily on JavaScript sometimes still show up in AI citations?
What’s Going On
Even if AI tools can’t access the full content of a page, they can still see what’s in the <head>
tag - including the page title and meta description. If those elements clearly align with the user’s query, some platforms (especially Perplexity) may still cite the page.
This is especially likely when:
The page title is very specific and matches the question asked
The brand is well-represented in the model’s training data
There are few competing sources with better content on the topic
Perplexity in particular tends to include JavaScript-only pages more often than ChatGPT, because it's more forgiving about content accessibility as long as the title appears relevant.
What You Need to Watch Out For
When an AI can’t access the page content but still includes it, it may hallucinate what’s on the page - filling in plausible but incorrect details based on the title and its prior knowledge.
This behavior can lead to:
Inaccurate product descriptions
False pricing info
Wrong feature lists
It’s a visibility win, but it carries risk - especially for regulated or customer-facing information.
How to Prevent This Problem (and Improve Performance)
To make sure your content is both cited and accurate, we recommend:
Pre-render key content: Ensure meaningful content is included in the HTML response, not just loaded via JavaScript.
Use clear, literal titles and meta descriptions: These are often the only parts AI can see on JavaScript-heavy pages.
Allowlist real-time retrieval bots: In
robots.txt
and your bot protection tools, make sureChatGPT-User
andPerplexityBot
are allowed.Run a Scrunch Site Audit: We'll flag JavaScript dependency issues and help you compare how your page appears to AI vs. humans.
Even if AI platforms can’t fully read your content, they may still reference it if the signal is strong enough. But to ensure they get it right - and cite you consistently - it’s best to serve meaningful content up front and make it easy for AI to access.
Need help evaluating your JavaScript-heavy pages? Run a Site Audit →