# React Tax

> How much of a page is framework rather than content — measured live — and what Onto removes.

Source: https://docs.buildonto.dev/concepts/react-tax
Section: Concepts

---

React Tax\[01\]

## React Tax

The part of a page that's framework rather than content — class strings, hydration data, scripts, chrome. People never see it. Agents read every byte.

### Measure it

\[02\]

This docs site is a Next.js app, and it serves every page twice: as HTML, and as Markdown at the same path plus `.md`. Pick one:

IntroductionQuickstartHow it worksPOST /v1/read

Measuring…

### Why agents pay it

\[03\]

Because

TokensThe model reads the whole payload, markup included, before it reaches a sentence

RoomMarkup fills the context window that the answer needed

AccuracyThe less of the input is content, the easier it is to miss the one line that mattered

### What Onto removes

\[04\]

What happens

Only the contentThe first `<main>` — or `<article>`, or the whole body. Everything outside it goes.

RemovedScripts (and the hydration data inside them), styles, noscript, iframes, SVG, nav, header, footer, meta, link

Dropped in conversionClass names and other attributes — they don't survive the move to Markdown

KeptHeadings, paragraphs, links, lists, tables, and your JSON-LD as a block at the end

**Hidden content still counts.** The cleaner doesn't know what CSS hides, so collapsed or off-screen text is kept.

### Your own numbers

\[05\]

Every [/v1/read](/api/read) response measures the page it read, in `stats`: `raw_html_size_kb`, `markdown_size_kb` and `reduction_percent`. Log them and you have the real tax across your own traffic — sizes are counted in characters, and the Markdown includes Onto's short header.

Copy as Markdown[](/concepts/react-tax.md "Open the raw Markdown")

---
## Structured Data (JSON-LD)
```json
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "name": "Onto Docs",
  "url": "https://docs.buildonto.dev",
  "description": "How to use Onto: serve AI agents Markdown from your Next.js site, call the Read API, connect over MCP, and read the AIO score.",
  "inLanguage": "en",
  "publisher": {
    "@type": "Organization",
    "name": "Onto",
    "url": "https://buildonto.dev"
  }
}
```