All insights

The tab nobody was looking at

Before you debug a difference between two views, make the two views comparable. Most of the difference is usually the measurement.

A client reported that a page looked different in the editor than it did live. That is a normal sentence and it usually means a bug. This time almost none of it was a bug. The editor canvas was three hundred pixels narrower than a browser tab, the viewport-relative heights were measured against a shorter frame, and the screenshots I had been comparing came from a tab that was not in the foreground, where the browser had quietly decided not to load the images or run the animations. Underneath all of that there was one real defect, and it had nothing to do with layout.

Three differences that were not differences

The editor in a visual page builder does not give the page the full window. It takes a slice for its own panel, so the canvas ends up noticeably narrower than a browser tab on the same screen. A section built to a fixed content width fills that narrower canvas edge to edge and shows white margins on the live page. A decorative block positioned off to the side has no room in the editor and appears only once there is room, which reads exactly like an element that has gone missing.

Heights expressed relative to the viewport behave the same way. The editor frame is shorter than a tab, so a hero built to a fraction of the viewport height is genuinely a different height in the two views, and both are correct.

The fix for both is not to explain them away but to remove them. The builder can hide its own panel and switch the canvas into preview mode, after which the canvas is as wide as a tab in the same window and the comparison is fair. It costs one command and it removes most of what looked like a bug.

A hidden tab lies

The third difference is the one worth carrying into other work. Browsers treat a tab that is not visible as a place where nothing needs to happen. Intersection observers do not fire, so elements that reveal themselves on scroll keep the class that holds them invisible. Lazy-loading images never load, because the thing that would trigger the load is the element entering a viewport nobody is looking at.

So a screenshot taken in a background tab shows a page with missing images and missing content, and every one of those absences is an artefact of the observer, not a property of the page. I had been reading exactly such a screenshot as evidence.

The reliable way to see what an anonymous visitor sees is a separate headless browser run with its own profile and a fixed time budget for the page to settle. Its own profile matters, because attaching to an already-running browser inherits that browser's session, its extensions and its logged-in state, none of which a visitor has. If you take screenshots while scrolling, scroll instantly rather than smoothly, or you photograph a position the page was passing through.

An observer that is not being watched reports a different page. That is not a bug in the page.

The defect underneath

Once the two views were comparable, one difference survived, and it was old. The stored page content still held image addresses pointing at a developer's local machine from when the site was first built years ago. The public page never shows this, because it resolves those images through their internal identifier and finds the right file. The editor, for one particular kind of section background, takes the stored address at face value, fails to load anything from a machine that has not existed for years, and shows an empty background.

That is the shape of a lot of long-lived systems. The defect is not in the rendering. It is a fossil in the data, invisible in the path most people use and visible in exactly one other path. There is a related trap next to it: an editor may have loaded an unsaved draft rather than the published version, so before concluding anything, check whether the revision the editor is showing is the published one.

What I do now

  • Make the two views the same width before comparing anything. Most reported visual differences do not survive that step.
  • Never screenshot in a background tab. If a check runs unattended, run it in an isolated headless browser with its own profile.
  • Treat missing images and missing animations in an automated capture as a suspected measurement fault first, and a page fault second.
  • Scroll instantly before capturing, never smoothly.
  • When one view is correct and another is not, look for stored data that the two views resolve differently, rather than for a rendering difference.
Key

Half of the visual bugs reported to me are the difference between two windows. Equalise the windows first, and what remains is the real defect.

Hung Mai

Hung Mai is an independent consultant in Weilmünster, Germany, mostly working remotely. He plans, builds and monitors AI automation for marketing and sales for companies without a digital team. About Hung Mai

Let's build something real.

Let's talkResponse within 24h.