Engineering

Landing Pages That Survive Core Web Vitals

A landing page can preserve its campaign logic without making rendering unpredictable. The useful work is to set budgets for the critical path, reserve layout space and keep interaction code proportionate.

7 min read
A wireframe drawing of a stack of page blocks beside an arc gauge with a needle, and a waveform trace running beneath.

Core Web Vitals are not a polishing task performed after a landing page has been approved. Largest Contentful Paint, Cumulative Layout Shift and Interaction to Next Paint describe constraints on the page architecture: how quickly the principal content can be discovered and rendered, whether geometry remains stable, and how much main-thread work competes with an interaction. A campaign page also carries analytics, consent, personalisation, forms and experimentation code, so its performance cannot be inferred from a static mock-up. The implementation needs explicit ownership of the critical path and a budget for every dependency placed on it.

Measure the page that visitors actually receive

Laboratory tools provide repeatable traces, but Core Web Vitals are field measurements aggregated from real navigation and interaction conditions. Both are necessary. A trace explains a slow font request or long task; field data shows whether that issue affects the route, device and traffic population that matters. Segment by page template, device class, connection and navigation type without reducing the sample until it becomes meaningless. Record releases, experiments and tag changes alongside measurements. A page can pass on a developer machine and regress for first-time mobile visitors because the test had warm caches, no consent flow and none of the production marketing scripts.

LCP starts with resource discovery

The LCP candidate on a landing page is commonly a hero image, poster frame or large text block. The browser must discover its source early, assign it appropriate priority and render it without waiting for unrelated work. Put the candidate in the initial HTML rather than creating it after a client-side effect. Use a responsive image source set whose breakpoints reflect rendered sizes, not an arbitrary collection of exports, and provide accurate sizes information. Compression matters, but discovery delay often costs more than another small encoding improvement. A preload is justified only when the browser would otherwise discover the actual LCP resource late; indiscriminate preloads compete with CSS and fonts.

Give images an enforceable budget

An image budget should specify rendered dimensions, acceptable formats, quality review and maximum transfer size by viewport. It should also control variants generated by the asset pipeline. Serving a desktop crop to a narrow screen wastes bytes even if CSS hides the edges. Width and height attributes, or an equivalent aspect ratio, reserve space before the file arrives. Images below the first viewport can be loaded lazily, but the LCP candidate should not be. Decorative video requires particular care: its poster, media metadata and autoplay behaviour can create several competing downloads. If motion is not essential to comprehension, a still image keeps both the network and decode path predictable.

  • Expose the LCP image in server-rendered HTML and verify its request begins without client JavaScript.
  • Generate correctly cropped responsive variants and make the sizes attribute match layout behaviour.
  • Reserve intrinsic space for every image, embed and form state before asynchronous content arrives.
  • Keep third-party scripts off the critical path and load them according to consent and business need.
  • Compare cold-cache mobile traces as well as field data after every material campaign change.

Font loading is a rendering policy

Web fonts affect LCP when the principal text remains invisible, and affect CLS when fallback and final glyph metrics differ. Subset families to the scripts and weights actually used. A variable font is not automatically smaller when only two static weights are required. Preload only the face needed above the fold, use a suitable display policy, and host files where caching and cross-origin configuration are controlled. The fallback stack should be chosen by metrics rather than visual resemblance alone. CSS font metric overrides can align ascent, descent and character width, reducing reflow when the intended face arrives. A brand typeface that delays the headline is an engineering decision, not a fixed design fact.

CLS comes from unowned geometry

Layout instability is usually introduced by components whose eventual size is unknown at initial paint. Cookie notices, validation messages, experiment variants, personalisation, injected review marks and late fonts all qualify. Reserve the largest reasonable geometry where a component is expected, or overlay transient controls when doing so does not obscure content or accessibility. Do not insert a promotional bar above content after load. Form errors should occupy planned regions and keep focus movement intelligible. Skeletons prevent shifts only when their dimensions match the resolved component. A placeholder that collapses into a differently shaped result merely postpones the movement and adds another paint.

INP is a main-thread scheduling problem

Interaction to Next Paint includes input delay, event processing and the time until the next frame can be presented. A fast click handler does not help if it waits behind a long hydration task. Break expensive work into tasks that yield, avoid synchronously parsing large configuration objects, and defer non-essential widgets until the browser is idle or the component approaches the viewport. Event handlers should update the immediate visual state first and schedule analytics or secondary calculations afterwards. Forms need particular scrutiny because validation libraries, telephone inputs and address lookup can create work on each keystroke. Measure actual interactions rather than treating total JavaScript size as a complete proxy.

Hydration must earn its cost

A landing page is mostly content, yet a conventional application build may hydrate the entire component tree to activate one form and a menu. Server-render static sections and create narrow interactive islands around controls that require state. Avoid shipping data and component code merely to reproduce HTML already present. If the framework supports selective or deferred hydration, establish which interactions must work immediately and test them before hydration completes. Client-side rendering can still be appropriate for a genuinely application-like calculator, but moving the whole route to the client exchanges a simple document delivery problem for JavaScript execution, state recovery and error handling on every visit.

The correct JavaScript budget is determined by the interactions the page must support, not by what the application framework makes convenient to bundle.

Third parties belong in the performance model

Tag managers make ownership diffuse without making execution free. Each analytics, advertising, chat and testing vendor can add DNS work, script evaluation, observers and network contention. Maintain an inventory containing purpose, owner, consent category, load condition and removal date. Load a tag because a decision depends on its data, not because it was present on the previous campaign. Server-side collection can reduce browser work but does not remove consent, governance or data-quality obligations. Test the production tag configuration, including the paths where consent is granted and refused. Synthetic monitoring that blocks third-party origins measures a different page from the one delivered.

Experiments need performance guardrails

An experiment that replaces the hero after paint contaminates both CLS and the causal interpretation of its result. Assign variants at the edge or server where possible, render the selected markup initially and carry the assignment consistently into analytics. When client assignment is unavoidable, constrain experiments to regions with reserved geometry and avoid hiding the complete document while a decision loads. Variant bundles should be split so every visitor does not download every treatment. Performance measurements should carry the experiment identifier, since a conversion result cannot be separated from a treatment that also changed responsiveness or delayed the primary call to action.

Turn budgets into release controls

Set route-level budgets for critical CSS, initial JavaScript, image variants, fonts and third-party execution, then enforce what can be checked in continuous integration. A byte budget will not directly guarantee a field percentile, but it stops unreviewed growth and makes trade-offs explicit. Automated traces should assert resource discovery, intrinsic dimensions and absence of large main-thread tasks on representative interactions. Visual regression should cover font fallback and delayed content, not only the fully loaded state. After release, field telemetry confirms whether the predicted improvement reached real visitors and whether a particular browser or campaign parameter introduced another path.

Optimise the constraint that moved

Performance work should follow evidence from candidate timing, resource waterfalls, layout-shift attribution and interaction traces. If LCP is delayed before its request starts, re-encoding the image is secondary. If INP is dominated by input delay, rewriting a small handler is irrelevant until long tasks are removed. If shifts come from a consent banner, tuning font loading will not repair them. Landing pages survive Core Web Vitals when their architecture makes important content discoverable, geometry predetermined and interaction work bounded. The result is not a stripped page. It is a page whose campaign features have known costs and whose performance remains testable as those features change.

Apply the thinking to your system.

Share the architecture, constraints and decision you are facing. We will respond to the engineering problem in front of you.