Skip to content

Fix cumulative layout shift

Measurable Lighthouse uplift, gated by CI so it sticks

  • Senior engineers · IST + EST overlap
  • NDA on day 1
  • 24-hour reply

Tell us what you need fixed

Reply in 24 hours · NDA on day 1 · No spam.

Fix cumulative layout shift — done properly, by senior engineers

You can fix cumulative layout shift permanently only by reserving space for every element before it loads, and that is the core of how Krapton’s engineers approach it. CLS adds up unexpected shifts inside session windows (shifts less than a second apart, capped at five seconds) and reports the worst window; Google rates 0.1 or less at the 75th percentile as good. Shifts within 500 milliseconds of a click, tap or key press are excluded, but scrolling is not treated as input, so images that load without dimensions while someone scrolls count in full. That is why Lighthouse, which only measures the initial load, can show almost no shift while field data is poor. We collect the largest shift target and source per page from the web-vitals attribution build, then replay the page in the Chrome DevTools Performance panel and WebPageTest filmstrips to watch each element move. Typical fixes are width and height or aspect-ratio on media, min-height on ad and embed containers, overlays instead of inserted banners, fallback fonts tuned with size-adjust, and transform-based animation. Deliverables include a shift-by-shift audit, the fixes themselves, field and lab comparisons, and a CLS budget in CI.

What you're seeing

Elements jump around as your page loads — ads, fonts, images — and CLS sits well above 0.1.

Our approach

We reserve dimensions for every dynamic element, swap font-display for the right strategy, and remove jank in the third-party tag manager, with a check that keeps new shifts from creeping back.

Symptoms teams come to us with

  • Users tap a link or button and hit a different one because content moved underneath their finger.
  • Article text jumps down when an ad, video embed or newsletter signup loads above it.
  • Lighthouse reports little layout shift, yet CrUX field CLS for the same page is rated poor.
  • Headings and paragraphs visibly reflow at the moment the web font replaces the fallback font.
  • Product grids shift while images load during scrolling, especially on slower mobile connections.

What we check first

  1. Images, videos and iframes ship without width, height or aspect-ratio, so the browser reserves zero height.
  2. Ad slots and third-party embeds collapse until their creative arrives, then expand and push content down.
  3. Fallback and web fonts have different metrics, so text reflows when font-display swap kicks in.
  4. Cookie consent bars, promo strips or personalized blocks are inserted above existing content after first paint.
  5. Animations change top, height or margin instead of transform, which the browser records as layout shifts.

Concrete deliverables, no fluff

Every engagement ends with measurable, documented outcomes — no black-box agency reports.

  • RUM-driven audit with line-level fix list
  • Implementation of every critical fix
  • Before/after metrics with screenshots
  • CI performance gate to prevent regression

What changes after we ship

  • Every shifting element traced

    Field attribution names the largest shift target and its source node for each template, including shifts after scrolling or delayed fetches that a load-only lab test never records.

  • Space reserved before content loads

    Media gets explicit dimensions or aspect-ratio boxes, ad and embed containers get a min-height sized to their usual creative, and skeletons match the real component dimensions.

  • Font swaps without visible reflow

    Fallback fonts are tuned with size-adjust, ascent-override and descent-override, or generated automatically by next/font, so switching to the web font barely moves surrounding text.

  • Layout shift budget in CI

    Automated page loads and scripted scrolls report CLS on each pull request, and a change that introduces unsized media or a late-inserted banner fails before merge.

From brief to shipped fix

A transparent, low-risk process — a senior engineer reads your brief personally, and nothing starts until you approve a written plan and price.

  1. 01Day 0–1

    Diagnose

    A senior engineer reviews your brief, reproduces the issue, and pinpoints the real root cause — not the symptom — before any code is touched.

  2. 02Within 24h

    Scoped plan & quote

    You get a written plan to fix Cumulative Layout Shift, a firm timeline, and a fixed quote. Nothing starts until you approve it — no surprise invoices.

  3. 031–2 weeks

    Ship the fix

    We implement on a branch and open a pull request you review, working to your code-review standards on your repo — never a black box.

  4. 04On delivery

    Verify & hand off

    We verify on staging and production, share before/after evidence where it applies, and leave you a short hand-off note so the fix sticks.

Situations we handle

  • Ad-funded publisher websites

    News and content sites running Google Ad Manager or header bidding, where multi-size ad slots, sticky units and sponsored embeds resize after the article text has already rendered.

  • Ecommerce themes and storefronts

    Shopify, WooCommerce and headless storefronts where review widgets, promo bars, currency switchers and lazy-loaded product images arrive late and move the add-to-cart button just as shoppers reach for it.

  • Single-page apps with client routing

    React or Vue apps where the browser treats every client-side route change as the same page lifetime, so a shift on any later view can become the CLS value that gets reported.

Why teams hand this task to Krapton

  • Senior engineers only

    Your brief is read and handled by a senior engineer — no junior hand-off, no sales-rep filter in between.

  • Root cause, not a patch

    We reproduce and fix the underlying cause, then add a guard so the same class of issue does not quietly return.

  • Your repo, your standards

    Every change lands as a pull request you review, on your repository, following your existing review process.

  • NDA on day one

    Confidentiality and IP are covered before we look at a single line of code. All work stays in your accounts.

  • Fixed quote up front

    You approve a written plan and price before work starts. If scope changes, we re-quote in writing — no surprise invoices.

  • Proof, where it applies

    Performance, SEO and reliability work ships with before/after evidence so the result is measurable, not anecdotal.

Three ways to engage

No retainer required. Pick the model that matches the work — pricing for this task starts from $500, with a fixed quote before anything starts.

  • Per task

    Most popular

    One clearly-scoped fix at a fixed price. Best when you know exactly what is broken and want it handled end to end.

    • Fixed quote up front
    • One PR, reviewed by you
    • No retainer required
  • Hourly

    Pay only for the hours worked. Best for diagnostics, audits, or exploratory work where the scope is still emerging.

    • Weekly timesheets
    • Pay for what you use
    • No minimum commitment
  • Per sprint

    A focused 1–2 week sprint when the work is bigger than one fix but smaller than a full project.

    • 1–2 week blocks
    • Clear sprint goal
    • Scale up or stop anytime

Industry-standard stack, no proprietary lock-in

  • Lighthouse
  • WebPageTest
  • Chrome DevTools
  • Next.js

Fix cumulative layout shift — your questions, answered

How much does it cost to fix Cumulative Layout Shift?

Pricing starts from $500 and depends on the scope we find during the diagnostic. You get a fixed, written quote before any work begins — most engagements like this run 1–2 weeks.

How long does it take to fix Cumulative Layout Shift?

Typically 1–2 weeks for a focused engagement. After a short diagnostic we commit to a firm timeline so you know exactly what to expect.

Can you fix cumulative layout shift caused by ads without removing them?

Usually yes, by reserving space rather than removing inventory. Each slot’s container is sized to the creative it most often serves, empty slots above content are not collapsed after load, and sticky or anchor units sit in fixed-position containers that overlay content instead of pushing it. Viewability and fill rate should be compared before and after with whoever manages your ad setup.

Do layout shifts after user interaction count toward CLS?

Only those outside a short window after a discrete input. Shifts within 500 milliseconds of a click, tap or key press carry the hadRecentInput flag and are excluded, which is why an accordion opening on click does not hurt. Scrolling does not count as input, so content that loads and resizes during a scroll is included, as are results that appear after a slow fetch outside that window.

Is font-display: optional better than swap for CLS?

It removes font-swap shifts but gives up guaranteed use of the brand font. With optional, the browser uses the web font only if it arrives within a very short block period; otherwise the fallback stays for that page view, so nothing reflows. With swap you need a metric-matched fallback to keep CLS low. We usually pair swap with size-adjusted fallbacks for brand fonts and choose optional for body text.

Let's get this off your plate

Send a 60-second brief on Fix Cumulative Layout Shift and a senior engineer replies within 24 hours with a plan and a fixed quote. NDA on day one, no retainer required.