How a machine reads a page
Part 2 · AI meets the web3 minA person reads the drawing; a machine reads the file. See what is left without JavaScript, in a picture, after trimming, and in structured data.
A page is a text file
Behind every web page is a file of HTML: the words of the page, wrapped in tags that say what each part is: a heading, a paragraph, a link, a button.
Every visitor, person or bot, gets that file first. What they do with it differs.
- HTML
- The language a web page is written in: text, marked up with tags like <h1> and <a>.
Why it matters. Whatever the site’s server sends in that file is the most an agent that does not run scripts will ever see.
A browser draws it
A person’s browser reads the file and draws it: fonts, colours, pictures, layout. Then it runs the page’s JavaScript, which can add and change what is on it.
The person sees the finished picture. They never see the file, and they never need to.
- JavaScript
- Code a page sends along for the browser to run. It can build parts of the page after it arrives.
Why it matters. A page a person likes and a page a machine can read are not the same thing, and a site is usually only tested for the first.
Most bots skip scripts
Running a page’s scripts takes a full browser, and time. Most crawlers and on-request fetchers do not: they read the HTML as it arrived, and stop.
On a page built by JavaScript, what arrived is a shell: a menu, an empty box, and a note to load the rest.
Why it matters. Words that only arrive by JavaScript are missing for most crawlers and fetchers. To them the page is empty.
Words in pictures
A banner that says “20% off all drippers” may be a picture of those words. A person reads it. A bot reading the HTML sees an image, and at most its alt text.
If the alt text is empty, the offer is not on the page at all, as far as the bot can tell.
- Alt text
- A short description of an image, written in the HTML, for anyone who cannot see the picture.
Why it matters. Put what matters in text. A sale, a price or an opening time in a picture is invisible to most readers that are not people.
Reader tools trim it
Before a page reaches the model, many fetch tools trim it: they drop menus, footers, cookie notices and scripts, and keep what looks like the main text.
They guess from the HTML: a <main> or <article> tag, headings, long paragraphs. A page that gives no such signs may lose the wrong part.
Some tools also stop after a set length, so what comes late in the file is the first to go.
Why it matters. Main content that sits in a clear <main> or <article>, early in the file, is what survives the trimming.
Data that says it plainly
A page can also carry structured data: a small block, invisible on screen, stating the facts in a fixed format.
“This is a Product. Its name is Hario V60. Its price is 24.00 in euros. It is in stock.”
- Structured data
- Facts in a standard machine-readable form, most often JSON-LD with schema.org words.
Why it matters. Structured data spares the model from guessing what a number on the page means. It reads the fact directly.
Two readers, one page
A person reads the drawing. A machine reads the file, usually without scripts, often trimmed, sometimes with the structured data on the side.
Most of what goes wrong for agents happens in the gap between the two: words a person sees and the file does not hold.
Why it matters. A page that works for both readers has its words in the HTML, its facts in structured data, and its point near the top.