
Agent-Legible Markup: What an Agent's Fetch Sees
Many AI crawlers parse served HTML without running JavaScript (Vercel and MERJ, December 2024). Audit what your templates hide behind scripts, server-render the content-bearing parts, and keep parity.
TL;DR: Many AI crawlers read a page by fetching its served HTML and parsing it, without running JavaScript: a December 2024 Vercel and MERJ measurement found that the OpenAI, Anthropic, Meta, ByteDance and Perplexity crawlers it measured did not render JavaScript, while Google's Gemini (through Googlebot's infrastructure) and AppleBot did. Content that exists only after hydration, a client-side fetch, or a click is invisible to a reader that does not run JavaScript. This article covers the one-command diagnostic, a per-template audit of JavaScript dependence, a fix hierarchy that server-renders the content-bearing parts rather than the whole app, semantic HTML as an extraction affordance, and the parity principle that separates legitimate agent-friendly representation from cloaking.
Many AI crawlers do not run your JavaScript
The economical way for an agent to read a web page is to fetch the HTML the server sends and parse it. Running a full headless browser for every fetch is possible, and some agents do it some of the time, but it is slower and costlier, and behavior varies across agents and over time (as of Oct 2026; capability claims for specific agents change often enough that none are tabulated here). The design floor that holds across agents is the served document.
Search crawlers went through the same problem years ago. Google's JavaScript SEO basics says Google processes JavaScript web apps in three main phases (crawling, rendering, and indexing): Googlebot queues all pages with a 200 HTTP status code for rendering, whether or not JavaScript is present on them, unless a robots meta tag or header tells Google not to index the page. A page may stay on that queue for a few seconds or longer, and once Google's resources allow, a headless Chromium renders it. The same page calls server-side or pre-rendering "still a great idea" because it makes a site faster for users and crawlers, and not all bots can run JavaScript. Agents that skip rendering entirely make the stakes plainer.
The consequence is blunt: content that exists only after hydration, after a client-side data fetch, or after user interaction is not there for a fetch-and-parse reader. A page can be flawless in a browser and close to empty for an agent.
The diagnostic is one command. Fetch your own page with a plain HTTP client and read what comes back:
curl -fsSL -A "Mozilla/5.0 (compatible; legibility-check)" https://example.com/guides/returns \
| grep -c "Refunds are issued"The response body is your agent-facing surface. If a sentence a reader would quote is missing from it, that sentence does not exist for this class of reader. The -L flag follows redirects, -f stops curl from passing an error page with a status code of 400 or greater to grep, and -S makes curl print an error message when the request fails even though -s silences everything else. The curl manual notes that -f is not fail-safe: non-successful response codes can slip through, especially when authentication is involved (response codes 401 and 407). If curl prints no error and the request did not hit an authentication response, a count of zero for a sentence that is plainly visible in the browser is the whole finding in one number. Run the same check without the custom user agent string too, since some stacks vary their response by user agent, which is itself worth knowing.
Scope: rendering strategy as a performance and SEO architecture decision belongs to modern frontend practice. This article evaluates one property only, whether the content survives a scriptless fetch.
The JS-dependence audit
The audit compares two documents per template type: the served HTML, and the rendered DOM after scripts have run. Do it per template, because templates share their failure modes. One article, one listing, one product or service page, one documentation page, and the homepage are a reasonable starting sample; add any other template your site uses.
Capturing the two documents takes no special tooling. The served HTML is what the plain HTTP client returned, or the browser's view-source, which shows the page's HTML source. The rendered DOM is what the browser's element inspector shows after the page settles, or what a headless browser run in the team's existing test harness serializes after load. Strip both to visible text, ignoring markup differences such as generated class names, and compare the text. A sentence-level diff is more useful than a markup diff, because the question is which words a reader can get, not which attributes changed.
For each template, inventory what exists only in the rendered DOM. The usual suspects:
- Client-fetched data: prices, availability, specifications, or listings loaded from an API after the shell renders.
- Interaction-mounted content: tabs, accordions, and "read more" panels whose content is not in the DOM until clicked.
- Infinite-scroll continuations: everything after the first page of results.
- Empty SPA shells: routes whose served HTML is a root element and a script tag.
Then triage by agent value, not by how the content is built:
| Content | Agent value | Priority |
|---|---|---|
| Explanations, specifications, policies, terms | Quoted and reasoned over | Fix first |
| Listings and navigation to detail pages | Needed to discover content | Fix second |
| Filters, sorting, carousels, interactive widgets | Conveniences for humans | Leave client-side |
Interactivity is not the problem; invisible content is. A filter panel that only works with JavaScript is fine as long as the items it filters are reachable in served HTML.
Record the result as an artifact per template, with the date and the gaps found, rather than as a one-off finding in a ticket. Templates regress when someone moves a section into a client component, and a recorded baseline is what a repeatable check compares against.
Server-rendered parity and semantic structure
The fix hierarchy starts small. Server-render or prerender the content-bearing parts of the template first: the explanation, the specification table, the policy text. A full migration of the application to server rendering is not a precondition for this. The goal is parity for the content, not for the whole app shell; interactive regions can keep hydrating on top of server-rendered text.
Reachable is necessary but not sufficient. The served HTML also has to be walkable, and that is what semantic HTML provides. The HTML element reference is effectively the vocabulary an extractor understands:
- A heading hierarchy that mirrors the content outline, following the WHATWG sections model, so a parser can tell which paragraphs belong to which topic.
- Real
tablemarkup with header cells for tabular facts, rather than grids ofdivelements styled to look like a table. - Lists for enumerable claims, so "three conditions" arrive as three items rather than one run-on paragraph.
- Landmarks such as
main,nav, and a page-levelfooterthat separate content from chrome, so the extractor can skip the menu and the cookie notice. In the HTML-AAM mappings, afooterscoped to the body element maps to thecontentinforole, while afooterscoped to themainelement or a sectioning content element such asarticlemaps tosectionfooterinstead.
Structure a parser can walk is structure an agent can trust. The same discipline serves assistive technology, and that convergence is real, but the two are not identical: passing an accessibility audit does not certify machine legibility, and the reverse is also true.
Alt text and captions compound with everything else. An image described in its markup can carry its meaning into extraction and into plain-text or markdown representations that keep alt text and captions; an undescribed image gives those representations nothing to carry.
Parity, not cloaking
Making content legible to agents creates a temptation worth naming: serving agents something different from what humans see. The line is clear. Representation may differ; substance may not.
What may legitimately differ per audience is format, chrome, and density: a markdown rendering, a page without navigation and banners, a feed instead of a listing. What may not differ is prices, claims, availability, and terms. Serving agents a different offer, a different policy, or content humans cannot see is the same kind of trust failure that Google's spam policies call cloaking when it is done to search engines: "presenting different content to users and search engines with the intent to manipulate search rankings and mislead users." Google does not consider a paywall or content-gating mechanism to be cloaking if Google can see the full content behind it, just like any person who has access to the gated material, and if the site follows Google's Flexible Sampling guidance. Agent platforms have every reason to police the same way. The practical safeguard is to generate every representation from one content source, so divergence would require extra work rather than happening by accident.
One honest limit: a scriptless fetch is the floor, not the whole picture. Some agents execute scripts, capabilities vary, and they change. Designing for the floor means the content works for every reader in that range; any specific claim about a particular agent's rendering should carry a source and a date.
Where this article stops: reachable, parseable structure. What the extracted content should say to earn a citation, such as answer-first paragraphs and question-led headings, is answer engine optimization, a separate discipline that starts where legibility ends.