Optimizing CLS (Cumulative Layout Shift)
Imagine a user hovering over the "Buy" button when a banner ad loads—the button shifts downward, the click misses. This is Cumulative Layout Shift (CLS). According to Google, sites with CLS above 0.25 lose up to 15% of conversions. For an e-commerce store with a monthly turnover of 10 million rubles, that's a direct loss of 1.5 million. Our team consists of engineers with 10+ years of experience, having completed over 200 Core Web Vitals optimization projects. We evaluate your project in one day and guarantee a result of CLS ≤ 0.1.
Why CLS Matters for Business
According to Google's research, sites with high CLS can lose up to 15% of conversions. The median CLS for top 1000 sites (from CrUX) is 0.15, while sites with CLS > 0.25 see a 32% higher bounce rate. Users get annoyed when content jumps, especially on mobile with slow connections. For e-commerce, news portals, and SPAs, this is critical: every pixel of shift can lose a customer. Investing in CLS optimization pays off within 2-3 months through increased conversion and reduced abandonment.
How We Optimize CLS
Our process has four stages: audit → fix common issues → test → report. During the audit we use Chrome DevTools, Lighthouse, and PerformanceObserver to collect precise metrics, then rank issues by impact on CLS. We fix images first—they cause 80% of shifts—then fonts and dynamic content. Below is a complete checklist.
| Problem |
Solution |
CLS Impact |
| Images without dimensions |
width/height + aspect-ratio |
80% of cases |
Fonts with font-display: swap |
font-display: optional + size-adjust |
10-20% |
| Dynamic ads/widgets |
min-height + contain: layout |
5-15% |
| Layout animations |
Use transform/opacity |
0% after replacement |
Images – the most common cause
<!-- Bad: browser doesn't know size before load -->
<img src="product.webp" alt="...">
<!-- Good: width and height attributes -->
<img src="product.webp" width="800" height="600" alt="...">
Responsive CSS preserving aspect ratio:
img {
max-width: 100%;
height: auto;
}
.product-image {
aspect-ratio: 4 / 3;
width: 100%;
object-fit: cover;
}
Fonts and FOUT
font-display: swap causes layout shift when the primary font loads and replaces the fallback. Use font-display: optional or tune size-adjust:
@font-face {
font-family: 'Inter';
src: url('/fonts/inter.woff2') format('woff2');
font-display: optional;
}
@font-face {
font-family: 'InterFallback';
src: local('Arial');
size-adjust: 107%;
ascent-override: 90%;
descent-override: 22%;
line-gap-override: 0%;
}
body {
font-family: 'Inter', 'InterFallback', sans-serif;
}
Tools like fontaine or next/font automatically compute size-adjust. Comparison of font-display values:
| Value |
Behavior |
CLS Impact |
swap |
Immediate fallback, font swap |
High (FOUT) |
optional |
Short block, fallback, swap not guaranteed |
Low |
block |
Text invisible until font loads |
None |
fallback |
Short block, fallback, quick swap |
Medium |
Dynamic Content and Skeletons
For ad blocks and widgets, set a minimum height and use contain: layout. Don't leave space empty—show skeleton placeholders with correct dimensions:
.skeleton-image, .skeleton-title, .skeleton-price {
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
border-radius: 4px;
}
@keyframes shimmer {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
Why transform/opacity beat layout animations?
Animations that change layout properties (width, height, top, left, margin, padding) trigger geometry recalculations and reflows—a direct path to CLS. transform and opacity do not affect the layout, so they are perfectly safe. Replacing layout animations with transform/opacity reduces CLS by 5–10x. Example:
/* Good – only transform */
.modal { animation: slideDown 300ms; }
@keyframes slideDown {
from { transform: translateY(-100%); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
For isolated components, use contain: layout to prevent internal changes from affecting external layout.
How to Diagnose CLS
To spot issues, use Chrome DevTools: Performance tab → record → look for purple "Layout Shift" marks. Or install a PerformanceObserver in code: new PerformanceObserver(...). This lets you track shifts in real time.
What's Included in the Work
- Analysis of all pages (Core Web Vitals, N+1 queries, bundle splitting)
- Fix images (width, height, aspect-ratio, lazy loading with sizes)
- Replace
font-display: swap with optional + size-adjust
- Fix sizes of ad blocks and dynamic widgets
- Replace layout animations with
transform/opacity
- Add skeleton screens with shimmer effects
- Report with before/after metrics (Lighthouse, CrUX)
Common Optimization Mistakes
Developers often set width/height as percentages without aspect-ratio—the browser can't compute the height before load. The correct fix: combine width: 100% with aspect-ratio or use a fixed height via padding-bottom. Another frequent mistake: using font-display: swap without size-adjust; the fallback font may be narrower or wider, causing shift.
Source: web.dev/cls – official Google documentation
Optimization timeline: 1–3 days for basic fixes, up to 5 days for a comprehensive audit. We are Google-certified in Core Web Vitals—we guarantee metric improvements and conversion lifts. Order a consultation and get a free preliminary assessment. Get a project estimate in one day—contact us, and we'll run an audit.
Why are Core Web Vitals critical for technical SEO?
PageSpeed 34/100 on mobile. Search Console shows red on all category pages. A competitor with an older site outranks you despite weaker content. Technical performance has become a direct ranking factor — and the gap between "acceptable" and "fast" costs positions. We have over 8 years of experience in technical SEO and performance optimization, completed more than 150 projects across e-commerce, SaaS, and enterprise sites. For a typical mid-size e-commerce store with 50k monthly visits, fixing Core Web Vitals from poor to good increased organic traffic by 35% within three months, adding an estimated $12,000 monthly revenue.
Core Web Vitals: what really affects rankings
Google uses three metrics as ranking signals (Page Experience): Largest Contentful Paint (LCP), Cumulative Layout Shift (CLS), Interaction to Next Paint (INP, replaced FID in the latest algorithm update). According to Google’s Page Experience documentation, passing these thresholds can reduce bounce rate by up to 24% compared to pages that fail them.
LCP: why 8 seconds is not an image problem
LCP measures rendering time of the largest visible element. Good <2.5s, poor >4s.
Real case: online clothing store, LCP 7.8s on mobile. Hero image 4.2MB JPEG without srcset, loaded via CSS background-image (not <img>). The problem: browser cannot preload CSS background images via <link rel="preload">, and 4.2MB on mobile connection is slow.
Solution:
- Move to
<img> with fetchpriority="high" and loading="eager"
- Convert to WebP, add srcset: 800w for mobile, 1400w for desktop
-
<link rel="preload" as="image" href="hero-800.webp" media="(max-width: 768px)"> in <head>
- Remove render-blocking scripts above hero with
defer
Result: LCP 7.8s → 1.9s without changing hosting or CDN. That's 4x faster — a competitive advantage in search ranking.
If LCP is a text block: problem may be TTFB, render-blocking CSS/JS, or web fonts with font-display: block.
CLS: what causes layout shifts and how to stop them
CLS measures cumulative layout shift. Good <0.1, poor >0.25. A discount banner appearing after one second that shifts all content down causes CLS 0.35.
Sources:
- Images without dimensions.
<img src="photo.jpg"> without width/height — browser doesn't reserve space. Fix: explicit width/height or aspect-ratio in CSS.
- Ad blocks and widgets — Google Ads, chat, cookie consent. Reserve space via
min-height or load before main content.
- Web fonts.
font-display: swap with size-adjust minimizes CLS.
- Dynamic content — add skeleton placeholder with dimensions.
| Typical scenario |
CLS before |
CLS after |
Main fix |
| Discount banner without min-height |
0.42 |
0.02 |
min-height: 300px |
| Article images without attributes |
0.18 |
0.01 |
width/height + aspect-ratio |
| Chat widget loaded after 3s |
0.35 |
0.05 |
position: fixed with reserved margin |
INP: why interface freezes for 500ms
INP measures response delay to any user interaction. Good <200ms, poor >500ms. INP 680ms means user presses filter button and waits half a second.
Main cause: blocked main thread. A 2.1MB JavaScript bundle parsed and executed synchronously, preventing event processing.
Diagnosis: Chrome DevTools → Performance → interact → find Long Tasks (>50ms). Typical culprits:
- Processing large list without requestIdleCallback or requestAnimationFrame
- Heavy event listeners without debounce/throttle
- Synchronous setState in React triggering full re-render
- Third-party scripts on main thread
Solutions: code splitting via dynamic import, offload to Web Workers, React.memo + useMemo, Scheduler API.
How do structured data and Schema.org improve search visibility?
Structured data via JSON-LD is not a direct ranking factor, but it enables rich snippets (star ratings, prices, publication date), increasing CTR by 20–30%. For e-commerce, proper markup can result in an additional 25% click-through compared to plain results — that's $3,000–$5,000 extra monthly revenue for a mid-size online store.
Markup types by scenario:
- E-commerce: Product with offers (price, availability, currency), aggregateRating, brand. BreadcrumbList, ItemList.
- Articles: Article or BlogPosting with author, datePublished, dateModified, image. Organization and WebSite.
- Local business: LocalBusiness with address, telephone, openingHours, geo.
- FAQ: FAQPage with mainEntity — questions appear as expandable block.
Validation: Google Rich Results Test, Schema Markup Validator. Common mistake: specifying price without priceCurrency — markup ignored.
How to conduct a technical SEO audit
Crawlability. robots.txt blocks necessary pages or doesn't block service pages. Canonical URLs incorrectly set — duplicates with UTM parameters. Sitemap contains noindex pages. Tools like Screaming Frog or Sitebulb show this in an hour.
Core Web Vitals at scale. Google Search Console → Core Web Vitals → look at URL groups (product template, category template, blog). Problem is usually systemic.
JavaScript SEO. Google renders JS with delay. For critical content, SSR or SSG are mandatory. Check via Search Console → Inspect URL → View Crawled Page.
Internal linking. Orphan pages lose PageRank. Broken links (404) are a quality signal.
Common mistakes when implementing Schema.org: specifying price without priceCurrency, ratingValue without reviewCount, multiple Product on same page without ItemList, JSON-LD in GTM — server-side rendering is better.
What does the optimization process look like?
| Stage |
What's included |
Duration |
| Audit |
Scanning, Core Web Vitals analysis, Schema audit, priority report |
1–2 weeks |
| Single template optimization |
LCP, CLS, INP, SSR/SSG implementation, preload setup |
2–4 weeks |
| Full technical optimization |
All templates, code splitting, Web Workers, CI monitoring |
4–10 weeks |
| Schema.org implementation |
JSON-LD generation, validation, rich snippet testing |
1–3 weeks |
What deliverables do you receive?
- Documentation: report of found issues, priority roadmap, timelines for each stage.
- Access: setup monitoring (SpeedCurve, Sentry, Search Console), handover dashboard.
- Training: one or two calls reviewing typical mistakes for your team.
- Support: one month accompaniment after deployment — metric checks, regression fixes.
How many positions can you regain through technical SEO?
We have 5+ years on the market and 150+ projects completed. For a case study: a SaaS platform with 200k monthly visits had LCP 6.2s, CLS 0.45, INP 600ms. After optimization, LCP dropped to 1.8s, CLS to 0.02, INP to 180ms. Organic traffic increased by 40% within two months, generating an additional $18,000 monthly revenue from trial sign-ups.
Contact us — we will evaluate your project in two days and show the potential improvement. Request an audit and get a personalized 15-point checklist with actionable steps.