What to block when an AI agent loads a web page: images, fonts or all CSS?
Block decoration, not stylesheets. In our test on five live sites, blocking images, fonts, media and animation kept every control an agent needed and saved 13% to 36% of bytes: Amazon’s search page loaded 2.7 times faster. Blocking all CSS made controls vanish on Google Flights and made hidden menus look real on GitHub and Amazon.
The three modes
We loaded five live sites in headless Chrome at 1280 by 900 (Hacker News, a GitHub repository, Google Flights, Amazon search and React TodoMVC), twice each, in three modes, and compared the controls the agent would see.
- Full: everything loads.
- Meaning: no images, fonts or media, animations off, stylesheets kept.
- No CSS: meaning, plus stylesheets blocked, style tags removed and style attributes stripped.
What happened on each site
- Hacker News: all three modes gave identical controls.
- GitHub repository: meaning mode was identical to full. With no CSS, 11 controls were lost and 65 hidden ones surfaced, such as the mobile navigation and collapsed menus. Bytes fell from 2.40 MB to 2.05 MB in meaning mode.
- Google Flights: meaning mode was identical. With no CSS, 42 controls were lost, the Best and Cheapest tabs among them, and 38 hidden dialogs appeared.
- Amazon search: load time fell from 9,610 ms to 3,485 ms in meaning mode, and bytes from 2.81 MB to 1.79 MB. With no CSS, 77 hidden controls surfaced. Amazon varies on its own between loads (36 lost and 33 extra controls with full CSS), so the small meaning-mode difference is inside that noise.
- React TodoMVC: the task worked in every mode. With no CSS a decorative arrow generated by CSS disappeared from a label.
Why cutting all CSS backfires
CSS decides what is visible and what is hidden. Remove it and menus, dialogs and mobile navigation that were hidden on purpose appear in the page as if they were real. The agent then sees controls a person could never click, and some real controls go missing. Style time dropped by at most about 90 ms, which did not show in load time, so the risk bought almost nothing.
How much of a page load is painting?
We also traced Chrome on the same five sites. Painting plus pixel work cost about 70 to 220 ms of CPU per page load, 13% to 41% of Chrome’s work on real sites. Page loads took 1.5 to 3.5 seconds, almost all of it network and script. So removing paint would trim a few percent of wall time for one tab, and a real share of CPU when many tabs run at once. These traces are approximate: some slices nest, raster work runs on other threads, and it was one run per site.
What Browser Layer does
It blocks decoration (images, fonts, media, motion) and keeps stylesheets, so an agent sees the page as it is laid out without paying for the pictures. It is the same reason the page map lists controls instead of markup.
Limits
Five sites, two runs each, one machine in India, and sites change. Treat the percentages as a measurement of these pages on this day, not a promise. The script that ran it is in the repository.
Questions
Should a browser agent load images?
Usually not. Blocking images, fonts and media kept every control the agent needed in our test and saved 13% to 36% of bytes. Load them only when the task depends on a picture.
Is it safe to block all CSS for an AI agent?
No. Without CSS, real controls disappeared on Google Flights and hidden menus appeared as if real on GitHub and Amazon.
Does blocking resources make agents faster?
It made Amazon’s search page load 2.7 times faster. On smaller pages the difference was small, because most of a load is network and script.