BACK TO BLOG

A tale of two pagespeeds

PageSpeed Score: ~90 — You are reading the respectable twin

It was the best of scores, it was the worst of scores, it was the age of metrics, it was the age of foolishness, it was the epoch of Core Web Vitals, it was the epoch of iframe trickery, it was the season of green checkmarks, it was the season of red failures, it was the spring of hope for SEO, it was the winter of despair for common sense.

This page has a twin. They are identical in every way that matters to you, the reader. Same words. Same styling. Same instant rendering. Yet one scores well on PageSpeed Insights, and the other scores zero.

Not low. Zero.

THE TWO VERSIONS

You are reading the respectable twin:

  1. This version — The well-behaved page. Scores ~90.
  2. The zero-speed version — The identical rogue. Scores 0.

Like Sydney Carton and Charles Darnay, they could swap places and you’d never know the difference. But the authorities—in this case, Google’s Lighthouse—see them very differently indeed.

THE TRICK

Google’s Lighthouse measures performance by observing the main frame of a document. It watches for paint events:

  • FCP (First Contentful Paint) — When pixels first appear
  • LCP (Largest Contentful Paint) — When the main content becomes visible
  • Speed Index — How quickly the viewport fills with content

Here is the peculiarity: iframes are not content.

An iframe element is merely a container, a window into another document. Lighthouse does not peer through that window. If all your visible content lives inside an iframe, the main frame appears empty to the measuring apparatus.

No content means no paint events. No paint events means the metrics never fire. And metrics that never fire produce a score of zero.

THE IMPLEMENTATION

The zero-speed version employs a data URI iframe:

<!DOCTYPE html>
<html>
<head>
  <title>Zero Speed Blog</title>
  <style>
    iframe {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
      border: none;
    }
  </style>
</head>
<body>
  <iframe src="data:text/html;charset=utf-8,..."></iframe>
</body>
</html>

The entire page—every word you’re reading, every style applied—is encoded within that data URI. This isn’t even a classical iframe that fetches content from elsewhere; everything you see still comes from this very page, just rendered inside an iframe. When the browser processes this:

  1. Main frame: Empty. Just an iframe element, which is not “contentful.”
  2. Iframe: Everything. The complete page, rendered instantly from inline data.

Lighthouse examines the first. You experience the second.

THE PARADOX

Here is the twist: the zero-speed version doesn’t load any slower.

There is no additional JavaScript blocking render. No extra network requests. The data URI is embedded directly in the HTML response. The content appears just as quickly as it would otherwise.

Yet Lighthouse declares it the worst page it has ever seen—slower, apparently, than a page that takes thirty seconds to load. The user experience is essentially identical; the verdict could not be more different.

THE METRICS

MetricThis VersionZero-Speed Twin
First Contentful Paint~0.8s~10s
Largest Contentful Paint~1.2s~10s
Total Blocking Time~50ms~55,000ms
Cumulative Layout Shift0~0.9
Speed Index~1.0s~10s
PageSpeed Score~901% (rounds to 0)

The same content. The same render speed. The same user experience. Two entirely different verdicts.

THE LESSON

“It is a far, far better thing to measure what matters than to matter what you measure.”

PageSpeed scores quantify specific technical signals, not user experience. A page can score 100 and feel sluggish. A page can score 0 and feel instant. The map is not the territory; the metric is not the experience.

This is precisely why Real User Monitoring (RUM) matters. Google’s own Chrome User Experience Report (CrUX) collects field data from actual Chrome users—and field data would tell a very different story here. Real users experiencing both pages would report similar load times, because they are similar. The synthetic lab test fails where real measurement succeeds.

When we optimize for the proxy instead of the thing itself, we end up in the Marshalsea of our own making—imprisoned by numbers that have forgotten their purpose.

This does not mean PageSpeed is useless. It catches genuine problems. But treating the score as gospel rather than diagnostic leads to what we might call cargo cult optimization: the rituals without the understanding.

THE RECALL TO LIFE

The iframe trick is impractical for real websites. Search engines would not index the content. Accessibility tools might struggle. It is, frankly, silly.

But it reveals something important: metrics can be gamed, and gaming them does not always harm users. Sometimes it helps them.

The real optimization is not chasing a number. It is:

  1. Measuring what matters — Real user metrics, not synthetic benchmarks
  2. Profiling actual usage — Where do your visitors actually wait?
  3. Testing on real devices — Lighthouse runs in ideal conditions
  4. Trusting your senses — If it feels fast, perhaps it is fast

A score of 100 on a page nobody wants is worth less than a score of 50 on a page people love.

TRY IT YOURSELF

Run Lighthouse on both. Notice how they feel. Consider which score tells the truth.


“It is a far, far better thing that I do, than I have ever done; it is a far, far better rest that I go to than I have ever known.” — Sydney Carton, who would have appreciated the irony of sacrificing metrics for user experience