<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Muhammd</title>
    <description>The latest articles on DEV Community by Muhammd (@techcoff).</description>
    <link>https://dev.to/techcoff</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4216336%2Fc51b3784-230b-4809-bef7-2c848fdd3693.png</url>
      <title>DEV Community: Muhammd</title>
      <link>https://dev.to/techcoff</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/techcoff"/>
    <language>en</language>
    <item>
      <title>Core Web Vitals in 2026: A Developer's Field Guide to LCP, INP, and CLS</title>
      <dc:creator>Muhammd</dc:creator>
      <pubDate>Fri, 30 Oct 2026 03:36:38 +0000</pubDate>
      <link>https://dev.to/techcoff/core-web-vitals-in-2026-a-developers-field-guide-to-lcp-inp-and-cls-3pg5</link>
      <guid>https://dev.to/techcoff/core-web-vitals-in-2026-a-developers-field-guide-to-lcp-inp-and-cls-3pg5</guid>
      <description>&lt;p&gt;Google still uses page experience as a ranking signal, and users still bounce from slow pages. In 2026 the three Core Web Vitals are &lt;strong&gt;LCP&lt;/strong&gt; (Largest Contentful Paint), &lt;strong&gt;INP&lt;/strong&gt; (Interaction to Next Paint), and &lt;strong&gt;CLS&lt;/strong&gt; (Cumulative Layout Shift). FID is gone — INP replaced it. Here's a practical, developer-first guide to passing all three.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. LCP — make the hero paint fast
&lt;/h2&gt;

&lt;p&gt;LCP measures when the largest visible element (usually the hero image or H1 block) renders. Target: &lt;strong&gt;under 2.5s&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The usual culprits:&lt;/strong&gt; unoptimized hero images, render-blocking CSS/JS, slow server response, web fonts that block text rendering.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fixes that actually move the needle:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Preload the hero image and mark it high priority:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"preload"&lt;/span&gt; &lt;span class="na"&gt;as=&lt;/span&gt;&lt;span class="s"&gt;"image"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/images/hero.webp"&lt;/span&gt; &lt;span class="na"&gt;fetchpriority=&lt;/span&gt;&lt;span class="s"&gt;"high"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/images/hero.webp"&lt;/span&gt; &lt;span class="na"&gt;fetchpriority=&lt;/span&gt;&lt;span class="s"&gt;"high"&lt;/span&gt; &lt;span class="na"&gt;decoding=&lt;/span&gt;&lt;span class="s"&gt;"async"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"..."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Serve modern formats. WebP or AVIF versions of the same image are typically 30–50% smaller than JPEG/PNG with no visible difference.&lt;/li&gt;
&lt;li&gt;Inline critical CSS for above-the-fold content; defer the rest. A &lt;code&gt;&amp;lt;link rel="stylesheet"&amp;gt;&lt;/code&gt; in the head blocks rendering until it downloads — if your full stylesheet is 200KB, the hero waits.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;font-display: swap&lt;/code&gt; so text renders immediately with a fallback font instead of invisible text (FOIT):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@font-face&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;'Inter'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;url&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;'/fonts/inter.woff2'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;'woff2'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;font-display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;swap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. INP — make every click feel instant
&lt;/h2&gt;

&lt;p&gt;INP measures responsiveness: the delay between a user interaction (click, tap, keypress) and the next visual update. Target: &lt;strong&gt;under 200ms&lt;/strong&gt;. It's measured across the whole page visit, and the worst interactions count — one janky dropdown can fail the metric.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The usual culprits:&lt;/strong&gt; long JavaScript tasks on the main thread, heavy frameworks hydrating everything at once, third-party scripts (chat widgets, ad tags, analytics).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fixes that actually move the needle:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Break up long tasks. Anything over 50ms blocks the main thread. Split work with &lt;code&gt;setTimeout&lt;/code&gt;, &lt;code&gt;requestIdleCallback&lt;/code&gt;, or move it to a Web Worker:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Instead of processing 10,000 rows synchronously...&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;processInChunks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;chunkSize&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chunk&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;chunkSize&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;renderChunk&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;chunkSize&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// yield to the main thread&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Defer non-critical third-party scripts. Load analytics with &lt;code&gt;defer&lt;/code&gt;, and delay chat widgets until first interaction — they are the #1 INP killer on marketing sites.&lt;/li&gt;
&lt;li&gt;Debounce input handlers (search boxes, filters) so you're not re-rendering on every keystroke:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;onInput&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;debounce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;runSearch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. CLS — stop the layout from jumping
&lt;/h2&gt;

&lt;p&gt;CLS measures visual stability: how much content shifts around while loading. Target: &lt;strong&gt;under 0.1&lt;/strong&gt;. Nothing destroys trust like a "Buy" button that jumps under your thumb.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The usual culprits:&lt;/strong&gt; images without dimensions, ads/embeds injected late, web fonts swapping (FOUT) with mismatched fallback metrics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fixes that actually move the needle:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Always reserve space for images and embeds. The modern way is &lt;code&gt;aspect-ratio&lt;/code&gt;, which works even for responsive images:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/images/card.webp"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"1200"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"630"&lt;/span&gt;
     &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"aspect-ratio: 1200 / 630; width: 100%; height: auto;"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"..."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Reserve space for ad slots and embeds with a fixed-height container — an empty 300px box that fills in is infinitely better than content jumping.&lt;/li&gt;
&lt;li&gt;Match your fallback font to your web font. Use &lt;code&gt;size-adjust&lt;/code&gt; in &lt;code&gt;@font-face&lt;/code&gt; so the swap doesn't reflow text:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@font-face&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;'Inter Fallback'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;'Arial'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;size-adjust&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;107%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;ascent-override&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;90%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Measure the right thing
&lt;/h2&gt;

&lt;p&gt;Lab scores (Lighthouse in DevTools) are for debugging. &lt;strong&gt;Field data is what Google uses&lt;/strong&gt; — real users on real devices and networks. Check both:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PageSpeed Insights&lt;/strong&gt; — shows field data (CrUX) plus lab diagnostics per URL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search Console → Core Web Vitals report&lt;/strong&gt; — aggregates your whole site; this is where Google tells you which URL groups fail.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web Vitals JS library&lt;/strong&gt; — measure in production and send to your analytics:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;onLCP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;onINP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;onCLS&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;web-vitals&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&gt;onLCP&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="nf"&gt;onINP&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="nf"&gt;onCLS&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A page can score 100 in Lighthouse on your M1 MacBook and still fail in the field on a mid-range Android phone in a 4G zone. Optimize for the field.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Hero image preloaded, WebP/AVIF, &lt;code&gt;fetchpriority="high"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;[ ] Critical CSS inlined, non-critical CSS deferred&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;font-display: swap&lt;/code&gt; + matched fallback fonts&lt;/li&gt;
&lt;li&gt;[ ] No JS task longer than 50ms on the main thread&lt;/li&gt;
&lt;li&gt;[ ] Third-party scripts deferred or delayed&lt;/li&gt;
&lt;li&gt;[ ] Every image/embed has reserved space (&lt;code&gt;width&lt;/code&gt;/&lt;code&gt;height&lt;/code&gt; or &lt;code&gt;aspect-ratio&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;[ ] Field data checked in PageSpeed Insights, not just Lighthouse&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;This is the developer's cut. For the full site-owner version — including server-level fixes, caching strategy, and image pipelines — I keep a &lt;a href="https://techcoff.com/technical-seo-checklist-2026/" rel="noopener noreferrer"&gt;15-point Technical SEO Checklist for 2026&lt;/a&gt; on TechCoff, where we do SEO, content, and cybersecurity for growing brands.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Read more practical guides at &lt;a href="https://techcoff.com" rel="noopener noreferrer"&gt;TechCoff.com&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>performance</category>
      <category>seo</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
