The usual warning about JavaScript and AI search is that many AI bots can’t read what JavaScript adds to a page. That’s true, but it’s only half the risk, because a bot that does run JavaScript can also pick up text your visitors never see. In November 2026, Google’s AI Overview told searchers that a ticket at a Singapore attraction was sold out when it could still be booked, and the only sold-out message on the page was hidden from visitors.
So I don’t think “can AI read JavaScript?” is the right question to ask about your site. A page really comes in three versions: the HTML your server sends, the page once JavaScript has run, and what a visitor sees once styling has hidden some of it. Different AI systems read different versions, and as I see it, the safest rule is that all three should say the same true thing.
In practice, that means not relying on JavaScript to hide, show, or swap content whose meaning changes, such as stock, prices, opening hours, or availability. That matters for answer engine optimisation (AEO) and generative engine optimisation (GEO), because a searcher who’s told a ticket is sold out has little reason to click through and find out it isn’t.
TL;DR
- Google’s AI Overview called a bookable ticket sold out in November 2026, using a status message that sat hidden on the page and only existed after JavaScript ran
- A bot that only reads the server’s HTML would have got this one right, because that HTML had no sold-out message and its data marked every ticket as not sold out
- It can go wrong the other way too, since in February 2026 a Google AI answer said a working site was offline because of a JavaScript status widget
- Hiding text with CSS only hides it from people, and five of six AI assistants in a March 2026 test read text hidden with
display:none - Which version an AI reads keeps changing, even within Google, so I’d make every version of a page say the same true thing
- The fix is to add status messages only when they’re true, keep the HTML in step with them, and put availability in structured data
A Ticket That Wasn’t Sold Out
In November 2026, we were checking a ticketing page for an event at an attraction in Singapore. When we searched whether the ticket had sold out, Google’s AI Overview said it had, citing the event’s official page. On that page, though, you could still book it, since a visit date was already selected and you could pick a time slot.
The sold-out message did exist, just not anywhere a visitor would see it. The site’s booking widget adds a sold-out note to every ticket card as the page loads, and on some cards a second note saying nothing is available on the chosen date. It then hides each note with a CSS class unless it applies, and on this page none of them applied, so every note stayed hidden.
When we asked the AI Overview where it had seen the status, it quoted those hidden notes word for word, in the same order they appear in the page’s code. The two notes are switched on by unrelated conditions, so a real booking state would rarely show both at once. To me, that points to the AI working from the page’s markup rather than anything a visitor saw.
None of that text was in the HTML the server sent, either. The page’s own embedded data marked every ticket as not sold out, so the message only existed once JavaScript had run, and only in a form visitors couldn’t see. Google doesn’t publish how AI Overviews treats hidden text, so this is my reading of the evidence rather than something Google has confirmed.
Why A Bot That Can’t Run JavaScript Would Have Got It Right
Googlebot renders pages, which means it runs the JavaScript the way a browser would before it indexes what it finds, as Google’s JavaScript SEO guide explains. Google also says AI Overviews and AI Mode only link to pages that are indexed and eligible for a snippet. So when the widget added its hidden notes, Google’s copy of the page had them, and judging by what the AI Overview said, it didn’t treat them as hidden.
A bot that only reads the HTML would have seen none of this. Writesonic, which sells AI bot analytics, tested six AI assistants in March 2026 and found that ChatGPT, Claude, and Gemini read only the HTML when they fetched a page themselves. On this ticketing page, that HTML said nothing about being sold out, and its data said the opposite.
A rendered page can also mislead for another reason, since Google says Googlebot clears cookies, local storage, and session storage between page loads, and declines permission requests. So I think of a rendered booking widget as a snapshot with no visitor in it: no date picked, no session, and no cart. Any message written for that empty state can end up in what Google indexes.
In the code, the pattern looks harmless. Here’s a simplified version, not the site’s own code:
// Added to every card, then hidden unless it applies
<p className={ticket.soldOut ? "status" : "status hidden"}>Sold out</p>
// Added only when it's true
{ticket.soldOut && <p className="status">Sold out</p>}
The first version puts a sold-out note on every card and relies on styling to hide it, so anything that reads the page without that styling finds “sold out” on every ticket. The second adds the note only when the ticket really has sold out, which leaves nothing false for any bot to find.
It Can Go Wrong The Other Way Too
The reverse happened to Code Input, a company that makes developer tools. In a February 2026 post, Abid Omar described a Google AI answer saying the website had indicated it was offline in early 2026, when the site was up. He suspected a status pop-up built with JavaScript, which either reached Google as a placeholder or failed when Google loaded it, and he removed the pop-up without saying whether that fixed the answer.
Google’s John Mueller responded, as Search Engine Journal reported, and advised against using JavaScript to change text on a page from “not available” to “available”. He suggested loading the whole block with JavaScript instead, so a client that doesn’t run JavaScript gets nothing rather than misleading information.
At Code Input, Google ended up with a version where the JavaScript hadn’t done its job, while on the ticketing page it got hidden text that only the JavaScript had added. So Google can land on either version, and I don’t think a site owner can predict which one it’ll use for any given answer.
Search Has Done This Before
None of this is new to Google Search. In 2019, Brodie Clark and Glenn Gabe posted featured snippets that Google had taken from content hidden in collapsed tabs. Then in 2020, JR Oakes hid one answer with display:none and another with visibility:hidden, and both were indexed and shown as answer boxes.
Ordinary snippets do it too. In a March 2024 thread on Shopify’s community forum, a store’s Google snippet showed text from its region and currency selector, a list of countries each marked in Norwegian krone, instead of its meta description. And in a 2018 thread on Cesium’s forum, Google described a 3D map page with the error message the page shows when WebGL fails, which a commenter put down to Google’s crawler not supporting WebGL.
Hiding Text With CSS Only Hides It From People
If the lesson were simply to avoid JavaScript, the server’s HTML would always be the safe version, but it isn’t. In Writesonic’s test, five of the six assistants read text hidden with display:none (Grok was the exception), and all six read text hidden with visibility:hidden or opacity:0. A bot that doesn’t apply styling treats hidden text as ordinary text, so styling hides nothing from it.
In The Guardian’s tests in November 2024, hidden instructions on fake camera product pages made ChatGPT search’s verdict entirely positive every time, even when the page showed negative reviews. So if your server’s HTML carries a hidden “out of stock” note or an expired promotion, an HTML-only bot can read it just as easily as Google read the hidden sold-out note.
Which Version An AI Reads Keeps Changing
Even Google’s own systems don’t read the same version. Google’s documentation for data-nosnippet says that because rendering isn’t guaranteed, it may pick up the attribute both before and after rendering. As Search Engine Roundtable reported in December 2025, Google’s Shopping crawlers don’t wait for structured data that JavaScript adds, while Googlebot for Search does.
One assistant can read both versions, too. In Writesonic’s test, Gemini’s own fetch read only the HTML, yet Writesonic notes that Gemini can also answer from Google’s index, where the rendered page sits, so Gemini can draw on two versions of your page depending on how it answers.
The bots themselves are changing as well. In a post from late September 2026, a site owner reported server logs from four sites showing OpenAI’s crawlers starting to run JavaScript on 25 September, although OpenAI hasn’t said so.
Which AI Bots Run JavaScript
This is where the evidence stood on 14 November 2026. It repeats the table from our guide to AI crawler access, with Writesonic’s test and the OpenAI reports added, and where nobody has published an answer, it says so.
| Type of bot | Bot or assistant | Runs JavaScript? | Used for | Evidence |
| Search index | Googlebot | Yes | Google Search, AI Overviews, and AI Mode | |
| Search index | Bingbot | Yes | Bing and Copilot | Microsoft, 2019 |
| Search index | Applebot | Yes, it may render pages in a browser | Siri, Spotlight, and Safari | Apple |
| AI search crawler | OAI-SearchBot | No in 2024, but site owners reported it starting in September 2026, which OpenAI hasn’t confirmed | ChatGPT search | Vercel, Dec 2024, Indie Hackers, Sep 2026 |
| AI search crawler | PerplexityBot | No in 2024, although Perplexity named a price only JavaScript had added in an October 2025 test | Perplexity search | Vercel, Dec 2024, searchVIU, Oct 2025 |
| AI search crawler | Claude-SearchBot, meta-webindexer, Amzn-SearchBot, MistralAI-Index, DuckAssistBot | Not published | Search in each company’s assistant | searchVIU, Nov 2026 |
| Training crawler | GPTBot | No in 2024, as it fetched JavaScript files without running them, but the September 2026 reports cover it too | Training OpenAI’s models | Vercel, Dec 2024, Indie Hackers, Sep 2026 |
| Training crawler | ClaudeBot | No, it fetches JavaScript files without running them | Training Anthropic’s models | Vercel, Dec 2024 |
| Training crawler | Meta-ExternalAgent, Bytespider, CCBot | No | Meta’s models, ByteDance data collection, and an open web archive | Vercel, Dec 2024 |
| Training crawler | Amazonbot, MistralAI-Training | Not published | Amazon and Mistral data collection | searchVIU, Nov 2026 |
| User-triggered fetch | ChatGPT, Claude | No in two tests | Reading a URL someone gives the assistant | Writesonic, Mar 2026, Alpar, June 2026 |
| User-triggered fetch | Gemini | No in two tests, although its answers can also draw on Google’s rendered index | Reading a URL someone gives the assistant | Writesonic, Mar 2026, Alpar, June 2026 |
| User-triggered fetch | Perplexity, Meta AI | Didn’t in one test | Reading a URL someone gives the assistant | Alpar, June 2026 |
| User-triggered fetch | Copilot | Mixed, since it read content JavaScript added within half a second in March 2026 but didn’t run the script in June 2026 | Reading a URL someone gives the assistant | Writesonic, Mar 2026, Alpar, June 2026 |
| User-triggered fetch | Grok | Partly, since it read content JavaScript added within 3 seconds in one test, and in another ran the script on one node but still gave the HTML’s answer | Reading a URL someone gives the assistant | Writesonic, Mar 2026, Alpar, June 2026 |
| User-triggered fetch | DeepSeek | Yes in two tests, although it missed content that took 3 seconds to appear | Reading a URL someone gives the assistant | Writesonic, Mar 2026, Alpar, June 2026 |
| User-triggered fetch | ERNIE, Qwen, Kimi, Mistral | Did in one test | Reading a URL someone gives the assistant | Alpar, June 2026 |
| Agent | ChatGPT agent | Can, when it uses its visual browser rather than its text-based one | Completing tasks for a user | OpenAI, July 2025 |
Most of the “No” answers for crawlers still come from one study, which Vercel and MERJ published in December 2024 from traffic across Vercel’s network, and Vercel sells Next.js hosting, so it has a commercial interest in server rendering. The newer tests don’t always agree either, since Copilot read JavaScript-added content in Writesonic’s March 2026 test but not in Andre Alpar’s June 2026 test. So I’d treat every row as a snapshot, not something to build a page around.
When JavaScript Is The Right Tool
JavaScript itself isn’t the problem, though. Mueller’s advice to Code Input was itself to use JavaScript, by loading the whole block, and in November 2026 he said that blocking a script used only for pop-ups in robots.txt generally works, as long as that script doesn’t also do other jobs. In both cases, JavaScript keeps a misleading version out of what Google reads.
Some sites also use JavaScript to keep content from AI on purpose. Mike King of iPullRank, which sells SEO services, suggested in May 2026 loading selected blocks of original research with JavaScript, then blocking that script for AI crawlers while checking that Googlebot still sees everything. I’d treat that as a deliberate trade-off rather than a default, because it depends on knowing which bots run JavaScript, and that’s the part that keeps changing.
For content you want AI to read, the usual warning still holds. Profound, which sells AI visibility tracking, wrote in September 2026 that once its pricing page moved to server-side rendering on 25 June, it became the second most-cited page on its site. It also found 10 pricing pages in its sample that hid at least 40% of their content from bots.
The Rule I’d Follow: Every Version Should Say The Same True Thing
If every version of a page says the same true thing, it doesn’t matter which one an AI reads. For content whose meaning changes, such as stock, prices, availability, opening hours, or region, these are the changes I’d ask a developer for:
- Add status messages only when they’re true: Render a sold-out or unavailable note only when its condition is met, rather than adding it everywhere and hiding it with CSS. On the ticketing page, that one change would fix every page that uses the same booking widget.
- Keep the server’s HTML in step, or leave the status out of it: If the HTML can’t carry the live status, leave it out and let JavaScript add the whole block once it knows the answer, as Mueller suggested.
- Put availability in structured data: Event markup takes an availability value of InStock, SoldOut, or PreOrder, and Google’s guidelines say not to mark up content that isn’t visible to readers, so the markup and the page have to agree.
- Use
data-nosnippetas a stopgap: Bing said in October 2025 that it keeps marked text out of its snippets and AI answers. Google describes the attribute in terms of snippets, so I’d expect it to help with AI Overviews without counting on it, and Google asks for it to be added when the element is created, not by JavaScript afterwards. - Don’t use JavaScript to change what a sentence means: Swapping “unavailable” for “available” after the page loads leaves the opposite statement in whichever version a bot reads first.
Once the fix is live, check the rendered HTML in Search Console’s URL Inspection tool, request indexing, and then check the AI answer again. Google says crawling can take anywhere from a few days to a few weeks, so the wrong answer may stay up for a while after the page is fixed.
How To Check Your Own Pages
You won’t spot this by looking at your site in a browser, because the whole problem is text you can’t see. These are the checks I’d run on any template whose content changes:
- Search the page source: Open view-source and search for words that carry a state, such as “sold out”, “out of stock”, “unavailable”, “closed”, “no results”, and “error”. Anything there that a visitor doesn’t see can be read by bots that only take the HTML.
- Search the rendered page: Do the same in your browser’s developer tools, or in the HTML from a live test in URL Inspection. Text that’s there but hidden on screen is text Google can pick up.
- Load the page with nothing chosen: Open it in a private window with no cookies, no date or location selected, and no permissions granted, which is roughly how Googlebot meets it, and see which messages appear.
- Ask the AI where it saw the claim: If an AI answer gets your page wrong, ask it which part of the page the claim came from. On the ticketing page, the AI Overview quoted the hidden notes word for word, which pointed straight at the cause.
- Check every template: One booking widget, product card, or store locator can repeat the same problem across hundreds of pages, so test each template rather than one page.
What I Can’t Tell You
As far as I know, Google hasn’t said whether AI Overviews apply CSS before using a page’s text. So the cause in this case is my inference from three things: the AI’s own wording, the hidden notes, and the fact that the text wasn’t in the server’s HTML.
I also don’t know of another public case where an AI answer quoted text hidden on a page, so one example tells you this can happen but not how often. Which bots run JavaScript is shifting too, so I’d recheck any of this before relying on it a few months from now.
Hidden Text And AI Answers FAQs
Does Google read text hidden with display:none?
Yes, Google can index text hidden with display:none and has shown it in search features. In a 2020 test reported by Search Engine Roundtable, answers hidden with display:none and visibility:hidden were both indexed and shown as answer boxes. In November 2026, an AI Overview also repeated a sold-out message that was hidden on a ticketing page, although Google hasn’t said how AI Overviews treats hidden text.
Can Google AI Overviews show information visitors can’t see?
Yes, it can happen. In November 2026, an AI Overview told searchers that a ticket for an event at an attraction in Singapore was sold out, quoting a status message that sat hidden on the page, while the ticket could still be booked. The message was added by JavaScript and hidden with CSS, so it only existed in the page Google rendered.
Can ChatGPT read hidden text on a page?
Yes, if the hidden text is in the HTML. In a March 2026 test by Writesonic, which sells AI bot analytics, ChatGPT read text hidden with display:none, visibility:hidden, and opacity:0, because it reads the HTML without applying styling. In The Guardian’s November 2024 tests, hidden text on product pages also changed what ChatGPT search said about them.
Does data-nosnippet keep text out of AI Overviews?
Not reliably, as far as Google has said. Google’s specification describes the attribute in terms of snippets, while its nosnippet and max-snippet rules explicitly cover AI Overviews and AI Mode. Bing said in October 2025 that data-nosnippet keeps text out of its AI answers, so I’d use it as a stopgap, added when the element is created rather than by JavaScript later.
Should I stop using JavaScript for dynamic content?
No, but I wouldn’t rely on it to hide, show, or swap content whose meaning changes, such as stock, prices, or availability. Add a status message only when it’s true, keep the server’s HTML consistent with it or leave the status out, and put availability in structured data. That way, every version of the page says the same thing, whichever one an AI reads.
How do I fix a wrong “sold out” in an AI answer?
Fix the page first, then wait for Google to recrawl it. Find where the wrong status comes from by searching the page source and the rendered HTML, change the code so the message only appears when it’s true, and check the result in URL Inspection. Then request indexing and keep checking the answer, since Google says crawling can take from a few days to a few weeks.
References
- Code Input: Google might think your website is down, February 2026
- Search Engine Journal: Google AI shows a site is offline due to JS content delivery, February 2026
- Writesonic: AI crawler study, 62 tests across 6 LLMs, March 2026
- The Guardian: ChatGPT search tool vulnerable to manipulation and deception, December 2024
- Google: JavaScript SEO basics
- Google: Fix Search-related JavaScript problems
- Google: AI features and your website
- Google: Robots meta tag, data-nosnippet, and X-Robots-Tag specifications
- Google: Event structured data
- Google: General structured data guidelines
- Google: Ask Google to recrawl your URLs
- Google: URL Inspection tool
- Bing: Support for the data-nosnippet attribute, October 2025
- Search Engine Roundtable: Hidden tab content in featured snippets, June 2019
- Search Engine Roundtable: display:none and visibility:hidden handled the same, December 2020
- Search Engine Roundtable: Shopping crawlers and JavaScript-generated structured data, December 2025
- Search Engine Roundtable: Blocking pop-ups with robots.txt, November 2026
- Shopify Community: Google showing currency information instead of the description, March 2024
- Cesium Community: Cesium pages in Google search, May 2018
- Vercel and MERJ: The rise of the AI crawler, December 2024
- Andre Alpar, Search Engine World: Do AI assistants render your JavaScript when grounding? June 2026
- searchVIU: AI crawlers and JavaScript rendering, updated 3 November 2026
- searchVIU: Schema markup and AI test, October 2025
- Microsoft: The new evergreen Bingbot, October 2019
- Apple: About Applebot
- OpenAI: Introducing ChatGPT agent, July 2025
- Indie Hackers: Are ChatGPT’s crawlers now running JavaScript? September 2026
- iPullRank: The case for cloaking for large language models, May 2026
- Profound: What AI agents really think about your pricing, September 2026
Information above was checked on 14 November 2026.







