Md Tarek — Portfolio© 2026

Full-stack Developer

System Design — built to hold up.

dhaka → remote, worldwide

Loading experience

Md TarekTarek
Marketing

Core Web Vitals INP LCP Optimization Guide: RUM Playbook

By: Md Tarek · 20 Oct 2026

Core Web Vitals INP LCP optimization guide: a real-user monitoring dashboard plotting p75 INP, LCP and CLS by route group
Core Web Vitals INP LCP optimization guide: a real-user monitoring dashboard plotting p75 INP, LCP and CLS by route group

Executive Summary & Key Takeaways

  • INP replaced FID in March 2024 and is scored at the 75th percentile of real interactions against a 200 ms pass line. Every slow interaction is the sum of three phases — input delay, processing duration, presentation delay — and on mid-tier Android hardware, *input delay* (main thread already busy) is the dominant term in roughly 60% of failing sessions. Measure the phases separately or you will optimize the wrong one.
  • LCP is a four-part waterfall, not an image weight problem: TTFB → resource load delay → resource load duration → element render delay. In production audits of failing mobile PDPs, TTFB + load delay consume 55–70% of a 4 s LCP. Adding fetchpriority="high" and removing loading="lazy" from the hero image typically moves field p75 LCP by 300–600 ms before you touch a single byte of compression.
  • CLS is almost always self-inflicted: web fonts swapping without metric overrides, images/iframes without intrinsic dimensions, and late-injected consent banners. size-adjust font fallbacks, aspect-ratio, and reserved banner slots routinely take p75 CLS from 0.21 to < 0.05.
  • Speculative prefetching does not fix your landing-page LCP. Speculation Rules prerendering collapses *subsequent* same-origin navigations to a prerendered LCP of ~0.4 s. It is a navigation-latency feature; bucket it separately in RUM or you will corrupt your LCP trendline.
  • CrUX is 28 days behind and origin/URL-aggregated; RUM is minutes behind and route/version-segmented. You need both — RUM to bisect a regression to a specific deploy, CrUX because that public field dataset is what the page-experience signal is computed from.

Deep Dive 1 — Main-Thread Scheduling and the INP Budget

INP is not "how fast my click handler ran." It is input → next paint, decomposed by the browser as:

t0  user taps ────────────────────────────────────────────────────────────────┐
                                                                              │
    ├── input delay ───────┤  (main thread busy: hydration, 3P tags, big task) │
                            ├── processing ────┤ (listeners + microtasks)      │
                                                ├─ rAF ─┬─ style ┬─ layout ┐   │
                                                        └─ paint / composite ─┤
                                                                              ▼
                                                                       next paint
    latency = input delay + processing duration + presentation delay

Chromium groups interactions by interactionId (a pointerdown + pointerup + click on the same target counts once), keeps the longest duration per group, and reports a high percentile (≈p98) of those group maxima per page load. Practical consequence: one catastrophically slow interaction can define your entire INP score, which is why tail sampling in RUM matters more for INP than for any other vital.

The blocking primitive is the long task: any task occupying the main thread for >50 ms prevents input from being dispatched. A 250 ms third-party tag that executes at 1.2 s guarantees at least 250 ms of input delay for any tap that lands inside it.

War story (B2C electronics PDP, ~9M sessions/mo): field INP p75 sat at 340 ms while Lighthouse TBT looked acceptable. Instrumenting LoAF entries showed a 1.4 s cluster of 11 marketing tags injected by a tag manager, each ~35–45 ms, plus a personalization snippet abusing a nested setTimeout(0) chain (clamped to 4 ms per hop) to "avoid blocking." Moving tags off the main thread and gating the personalization snippet behind first idle or first interaction cut input delay from ~210 ms to ~60 ms and field INP p75 to 150 ms in three weeks.

Three levers, in order of impact:

1. Delete or defer work. Every 100 KB of blocking third-party JS you remove is worth more than any micro-optimization. Load tag managers after load + idle *or* after first user intent (pointerdown/scroll), never synchronously in <head>. 2. Yield inside long work. Break tasks into <50 ms slices and yield with priority:

// yield.ts — cooperative scheduling that keeps the browser responsive.
export async function yieldToMain(): Promise<void> {
  const scheduler = (globalThis as unknown as {
    scheduler?: { yield?: () => Promise<void>; postTask?: (cb: () => void, o?: { priority?: string }) => Promise<void> };
  }).scheduler;

  if (scheduler?.yield) return scheduler.yield();                 // Chrome 129+: continuation keeps priority
  if (scheduler?.postTask) return scheduler.postTask(() => {}, { priority: 'user-visible' });

  // Fallback: a MessageChannel macrotask is not clamped like nested setTimeout(0).
  await new Promise<void>((resolve) => {
    const channel = new MessageChannel();
    channel.port1.onmessage = () => resolve();
    channel.port2.postMessage(null);
  });
}

/** Process items without ever holding the main thread > ~40 ms. */
export async function processInSlices<T>(items: readonly T[], handle: (item: T) => void): Promise<void> {
  let sliceStart = performance.now();
  for (const item of items) {
    handle(item);
    if (performance.now() - sliceStart > 40) {
      await yieldToMain();
      sliceStart = performance.now();
    }
  }
}

3. Shrink the non-yieldable blocks. Hydration is the classic offender: a 3000-node React tree can cost 600–1200 ms of synchronous main-thread time on a Moto G-class device. Fix with streaming SSR + Suspense selective hydration, startTransition/useDeferredValue for non-urgent state updates, virtualization for long lists, and content-visibility: auto + contain-intrinsic-size for offscreen sections.

Attribution tooling that actually finds the culprit — Long Animation Frames (Chrome 123+) reports the script URL and function that burned the frame:

new PerformanceObserver((list) => {
  for (const entry of list.getEntries()) {
    if (entry.duration < 80) continue;
    const scripts = (entry.scripts ?? []).map((s) => `${s.invoker}/${s.sourceFunctionName || 'anonymous'} ${Math.round(s.duration)}ms`);
    console.warn('[LoAF]', Math.round(entry.duration) + 'ms', scripts.join(' | '));
  }
}).observe({ type: 'long-animation-frame', buffered: true });

Deep Dive 2 — LCP Resource Priority, Fetch Priority, and Speculative Navigation

LCP is the render time of the largest contentful paint *within the viewport*, measured until the first user interaction. Diagnose it as a waterfall, never as a single number — the web-vitals attribution build gives you the four sub-parts directly (timeToFirstByte, resourceLoadDelay, resourceLoadDuration, elementRenderDelay).

0 ms     request ───────► first byte                       TTFB 780 ms   ← edge cache / 103 Early Hints
780 ms                    └─ resource load delay 90 ms     ← hero discovered by preload scanner? or after CSS?
870 ms                    └─ resource load duration 260 ms ← AVIF 1200w ≈ 48 KB on 4G
1130 ms                   └─ element render delay 100 ms   ← blocking JS, font swap, lazy hydration
1230 ms                   └─ LCP painted

Budget targets that hold up in the field: TTFB ≤ 800 ms (aim 200–400 ms with an edge cache), load delay ≤ 100 ms (ideally ~0), load duration bounded by ~150–300 ms for the hero resource, render delay ≤ 100 ms.

Discovery is where most LCP budget dies. An <img> in the initial HTML is found by the preload scanner before CSS/JS parse. A CSS background-image hero is discovered only after the stylesheet downloads and the style tree is built (+1 RTT). A JS-rendered hero waits for bundle download → parse → execute → render. Fix in this order: put the hero in HTML, preload it, then raise its priority explicitly.

<link rel="preload" as="image" fetchpriority="high"
      imagesrcset="/media/hero-640.avif 640w, /media/hero-1200.avif 1200w"
      imagesizes="(max-width: 640px) 100vw, 1200px" />
<img
  src="/media/hero-1200.avif"
  srcset="/media/hero-640.avif 640w, /media/hero-1200.avif 1200w, /media/hero-1920.avif 1920w"
  sizes="(max-width: 640px) 100vw, 1200px"
  width="1200" height="630"
  fetchpriority="high" decoding="async" loading="eager"
  alt="Product dashboard preview"
/>

Priority Hints (fetchpriority) is supported in all evergreen browsers as of 2025 (Chrome 101+, Safari 17.2+, Firefox 132+) and is a *hint*: it re-orders the fetch queue, it does not create bandwidth. Marking five resources high is equivalent to marking none. One hero (plus optionally the LCP font) is the correct budget; mark below-fold carousel/gallery images fetchpriority="low" and loading="lazy".

Speculation Rules attack the *next* navigation, not this one:

// speculation.ts — prerender high-intent destinations, prefetch the long tail.
const rules = {
  prerender: [
    { source: 'list', urls: ['/pricing', '/docs/quickstart', '/signup'], eagerness: 'moderate' },
  ],
  prefetch: [
    { source: 'document', where: { href_matches: '/products/*' }, eagerness: 'conservative' },
  ],
};

export function installSpeculationRules(): void {
  // Chromium-only today; the guard keeps Safari/Firefox from parsing a dead script.
  if (!HTMLScriptElement.supports?.('speculationrules')) return;
  const script = document.createElement('script');
  script.type = 'speculationrules';
  script.textContent = JSON.stringify(rules);
  document.head.append(script);
}

Eagerness semantics that matter operationally: immediate = now, moderate = on hover (~200 ms intent) or pointerdown, conservative = pointerdown/click only. The old eager level was removed from Chromium in 2024 — configs still shipping it silently degrade. Prerendered documents run *all* their JavaScript, so guard analytics, websockets, autoplay and A/B assignment behind document.prerendering and the prerenderingchange event, and send Supports-Loading-Mode: credentialed-prerender if the destination needs cookies.

War story (developer docs site): enabling prerender on the six top nav links moved p75 time-to-LCP on *subsequent* navigations from 2.4 s to ~0.5 s, but the SPA's analytics client fired a pageview at script-execution time, inflating sessions 23% for a week. The fix was a two-line guard on document.prerendering plus bucketing navigationType: 'prerender' in the warehouse.

Deep Dive 3 — CLS Determinism and the RUM Feedback Loop

CLS is the maximum session window score, where a session window is a cluster of layout shifts each within 1 s of the previous one and no longer than 5 s total. A single shift scores impact fraction × distance fraction — a full-width block moving 25% of the viewport height scores 0.25. Crucially, shifts within 500 ms of a user interaction are excluded, so "it only shifts when you click" is genuinely free; "it shifts 800 ms after load" is not.

The three production causes, ranked by frequency in audits:

1. Web fonts. font-display: swap without metric-compatible fallbacks produces 0.15–0.30 CLS on text-heavy pages. Ship size-adjust, ascent-override, descent-override, line-gap-override on the fallback @font-face (or use Next/font / Fontaine, which generate them), preload the woff2 with crossorigin, and subset to the glyphs you actually render. 2. Unsized media and embeds. Every <img>, <video>, and <iframe> needs width/height or a CSS aspect-ratio. For below-fold sections use content-visibility: auto; contain-intrinsic-size: auto 600px; so skipped subtrees still reserve space. 3. Late-injected UI. Consent banners, promos, and "recently viewed" rails. Reserve the slot with a min-height, or render the banner as a fixed overlay — a fixed element cannot shift document flow.

Now the observability half. CrUX gives you a 28-day rolling p75 at origin and (for popular URLs) URL level — that is the public number Google's page-experience signal consumes — but it cannot tell you *which commit* broke INP on Tuesday. That requires first-party RUM.

Browser: web-vitals v4 (attribution) + LoAF observer
   │  sendBeacon JSON (≤64 KiB, batched, credentials: omit)
   ▼
Edge collector (Worker / nginx → 204, drops query strings, no cookies)
   │  stream
   ▼
Warehouse (BigQuery rum_vitals_raw, partitioned by _PARTITIONDATE)
   │  scheduled query: p50/p75/p95 per route_group, per release, per device class
   ├──────────► Dashboard (p75 trend by appVersion)
   └──────────► Alerts: p75 regression >15% week-over-week, ≥1000 samples

Two sampling rules keep cost sane without blinding you: head-sample 10% of sessions for volume, and tail-keep 100% of any metric that exceeds its "good" threshold. A pure 10% sample can miss a regression that only affects 2% of interactions — precisely the regressions that matter for INP.

Practical Implementation

A complete, deployable collector using web-vitals v4's attribution build. It normalizes routes (no PII in the payload), tail-keeps regressions, batches beacons, and exposes a router hook for SPA navigations.

/**
 * rum/vitals.ts — first-party Core Web Vitals collector (web-vitals v4, attribution build).
 *
 *  - Head sample (10%) for volume; tail-keep 100% of non-good metrics.
 *  - Payload contains normalized routes only — no query strings, no user ids.
 *  - Batched beacons flushed on visibilitychange/pagehide, with a keepalive fetch fallback.
 */
import { onCLS, onFCP, onINP, onLCP, onTTFB } from 'web-vitals/attribution';
import type { Metric } from 'web-vitals';

type MetricName = 'CLS' | 'FCP' | 'INP' | 'LCP' | 'TTFB';

interface RumRecord {
  name: MetricName;
  value: number;
  rating: Metric['rating'];
  delta: number;
  id: string;
  navigationType: string;
  route: string;
  phase: 'navigation' | 'route-change';
  appVersion: string;
  sessionId: string;
  connection: { effectiveType?: string; rtt?: number; downlink?: number; saveData?: boolean };
  attribution: Record<string, string | number | undefined>;
}

const CONFIG = {
  endpoint: '/api/rum/vitals',
  appVersion: 'web-0.0.0', // inject the commit SHA at build time
  headSampleRate: 0.1,
  flushIntervalMs: 5_000,
  maxBatch: 20,
} as const;

/** "Good" boundaries; anything above them is tail-kept at 100%. */
const GOOD_LIMIT: Record<MetricName, number> = { LCP: 2500, INP: 200, CLS: 0.1, TTFB: 800, FCP: 1800 };

const headSampled = Math.random() < CONFIG.headSampleRate;
const sessionId = readSessionId();
let route = normalizeRoute(location.pathname);
let phase: RumRecord['phase'] = 'navigation';
const buffer: RumRecord[] = [];

function readSessionId(): string {
  const key = 'rum.sid';
  try {
    const existing = sessionStorage.getItem(key);
    if (existing) return existing;
    const created = crypto.randomUUID();
    sessionStorage.setItem(key, created);
    return created;
  } catch {
    return crypto.randomUUID(); // Safari private mode / storage disabled
  }
}

/** Collapse ids and slugs so 10k product URLs aggregate into one dashboard row. */
function normalizeRoute(pathname: string): string {
  const cleaned = pathname
    .replace(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi, ':uuid')
    .replace(/[/][0-9]{2,}(?=[/]|$)/g, '/:id')
    .replace(/[/][a-z0-9]+(-[a-z0-9]+){2,}/gi, '/:slug')
    .slice(0, 180);
  return cleaned || '/';
}

function stripQuery(url: string): string {
  return url.split('?')[0].split('#')[0];
}

function round(value: unknown, digits = 1): number | undefined {
  return typeof value === 'number' && Number.isFinite(value)
    ? Math.round(value * 10 ** digits) / 10 ** digits
    : undefined;
}

/** Attribution targets arrive as Elements or selectors; strip anything user-generated. */
function describeElement(target: unknown): string | undefined {
  if (!target) return undefined;
  if (typeof target === 'string') return sanitizeSelector(target);
  if (typeof Element !== 'undefined' && target instanceof Element) {
    const id = target.id ? '#' + target.id : '';
    const classes = [...target.classList].slice(0, 3).map((c) => '.' + c).join('');
    return sanitizeSelector(target.tagName.toLowerCase() + id + classes);
  }
  return undefined;
}

function sanitizeSelector(selector: string): string {
  return selector.replace(/[^a-zA-Z0-9#._:>-]/g, '').slice(0, 120);
}

function buildAttribution(metric: Metric): RumRecord['attribution'] {
  const attribution = (metric as unknown as { attribution?: Record<string, any> }).attribution ?? {};

  switch (metric.name) {
    case 'LCP':
      return {
        element: describeElement(attribution.target),
        resource: attribution.url ? stripQuery(String(attribution.url)) : undefined,
        ttfb: round(attribution.timeToFirstByte),
        loadDelay: round(attribution.resourceLoadDelay),
        loadDuration: round(attribution.resourceLoadDuration),
        renderDelay: round(attribution.elementRenderDelay),
      };
    case 'INP':
      return {
        interaction: attribution.interactionType,
        element: describeElement(attribution.interactionTarget),
        inputDelay: round(attribution.inputDelay),
        processing: round(attribution.processingDuration),
        presentation: round(attribution.presentationDelay),
        longestScript: attribution.longAnimationFrameEntries?.[0]?.scripts?.[0]?.sourceFunctionName,
      };
    case 'CLS':
      return {
        element: describeElement(attribution.largestShiftTarget),
        shiftValue: round(attribution.largestShiftValue, 4),
        shiftTime: round(attribution.largestShiftTime),
      };
    default:
      return {};
  }
}

function record(metric: Metric): void {
  if (!headSampled && metric.value <= GOOD_LIMIT[metric.name as MetricName]) return;

  const connection = (navigator as unknown as { connection?: Record<string, any> }).connection ?? {};

  buffer.push({
    name: metric.name as MetricName,
    value: round(metric.value) ?? 0,
    rating: metric.rating,
    delta: round(metric.delta) ?? 0,
    id: metric.id,
    navigationType: metric.navigationType,
    route,
    phase,
    appVersion: CONFIG.appVersion,
    sessionId,
    connection: {
      effectiveType: connection.effectiveType,
      rtt: connection.rtt,
      downlink: connection.downlink,
      saveData: connection.saveData,
    },
    attribution: buildAttribution(metric),
  });

  if (buffer.length >= CONFIG.maxBatch) flush('batch');
}

function flush(reason: 'batch' | 'pagehide'): void {
  if (buffer.length === 0) return;
  const body = JSON.stringify({ reason, sentAt: Date.now(), records: buffer.splice(0, buffer.length) });

  // sendBeacon caps payloads at 64 KiB; a record is ~600 B and maxBatch bounds the rest.
  const blob = new Blob([body], { type: 'application/json' });
  if (navigator.sendBeacon?.(CONFIG.endpoint, blob)) return;

  void fetch(CONFIG.endpoint, {
    method: 'POST',
    body,
    headers: { 'Content-Type': 'application/json' },
    keepalive: true,
    credentials: 'omit',
  }).catch(() => {
    /* analytics must never break the page */
  });
}

onTTFB(record);
onFCP(record);
onLCP(record);
onINP(record);
onCLS(record);

addEventListener('visibilitychange', () => {
  if (document.visibilityState === 'hidden') flush('pagehide');
}, { capture: true });

addEventListener('pagehide', () => flush('pagehide'));
setInterval(() => flush('batch'), CONFIG.flushIntervalMs);

/** Call from your router after every client-side navigation. */
export function reportRouteChange(nextPath?: string): void {
  flush('batch');
  phase = 'route-change';
  route = normalizeRoute(nextPath ?? location.pathname);
}

The aggregation layer is where most teams accidentally lie to themselves. Never compute p75 in the browser (session-weighted quantiles are not associative); store raw rows and quantile the warehouse:

-- rum/dashboards/vitals_p75.sql — trailing 7-day p75 per route group, navigation phase only.
WITH raw AS (
  SELECT
    record.name                      AS metric,
    record.value                     AS value,
    record.rating                    AS rating,
    record.route                     AS route,
    record.appVersion                AS app_version,
    record.connection.effectiveType  AS effective_type
  FROM `acme.rum.vitals_raw`, UNNEST(records) AS record
  WHERE _PARTITIONDATE >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
    AND record.phase = 'navigation'          -- keep SPA route changes out of the landing-page budget
    AND record.appVersion LIKE 'web-%'       -- exclude native/embed clients
)
SELECT
  REGEXP_EXTRACT(route, r'^/(?:[a-z]{2}-[a-z]{2})?([^/]*)') AS route_group,
  metric,
  effective_type,
  COUNT(*)                                                  AS samples,
  APPROX_QUANTILES(value, 100)[OFFSET(75)]                  AS p75,
  APPROX_QUANTILES(value, 100)[OFFSET(95)]                  AS p95,
  SAFE_DIVIDE(COUNTIF(rating = 'good'), COUNT(*))           AS good_share
FROM raw
WHERE metric IN ('LCP', 'INP', 'CLS')
GROUP BY route_group, metric, effective_type
HAVING samples >= 1000   -- below this, quantiles are noise, not signal
ORDER BY metric, route_group, effective_type;

Performance Benchmarks & Trade-Offs

Table 1 — Scoring bands and how each metric aggregates

| Metric | Good | Needs improvement | Poor | Aggregation | Replaced | |---|---|---|---|---|---| | LCP | ≤ 2.5 s | 2.5–4.0 s | > 4.0 s | p75 of page loads | — | | INP | ≤ 200 ms | 200–500 ms | > 500 ms | high percentile (~p98) of grouped interactions, then p75 across loads | FID (Mar 2024) | | CLS | ≤ 0.10 | 0.10–0.25 | > 0.25 | max 5 s session window, then p75 across loads | — | | TTFB (diag) | ≤ 800 ms | 0.8–1.8 s | > 1.8 s | p75 of navigations | — | | TBT (lab proxy) | ≤ 200 ms | 200–600 ms | > 600 ms | Lighthouse lab only | INP's lab stand-in |

Table 2 — Field impact of each optimization stage

| Stage | LCP p75 | INP p75 | CLS p75 | JS transfer | TTFB p75 | Effort | Risk | |---|---|---|---|---|---|---|---| | 0. Baseline SPA PDP | 4.1 s | 340 ms | 0.21 | 420 KB | 780 ms | — | — | | 1. Hero preload + fetchpriority="high", remove loading="lazy" | 2.9 s | 340 ms | 0.21 | 420 KB | 780 ms | 1 day | Double fetch if imagesrcset mismatches | | 2. Image CDN + AVIF + srcset/sizes + decoding="async" | 2.2 s | 330 ms | 0.04 | 420 KB | 780 ms | 3 days | AVIF fallback for old Safari | | 3. Edge cache + 103 Early Hints + Brotli | 1.7 s | 330 ms | 0.04 | 210 KB | 180 ms | 1 week | Stale HTML on deploy without atomic purge | | 4. INP work: yieldToMain, GTM deferred, React transitions | 1.7 s | 150 ms | 0.04 | 210 KB | 180 ms | 2 weeks | Tag/marketing regressions if tags move | | 5. Speculation Rules prerender (subsequent navigations only) | 0.4 s* | 130 ms | 0.02 | 210 KB | — | 2 days | Double-counted analytics; memory pressure evicts prerenders |

*Field data, 28-day p75, Android mid-tier (Moto G-Power class), Fast 4G, single PDP template, n ≈ 180k sessions. * = measured on the second navigation from a prerendered link; the landing-page LCP is unchanged at 1.7 s. Chromium also caps concurrent prerenders per tab and evicts them under memory pressure, so treat 0.4 s as a best case, not a median.

Pro-Tips & Common Pitfalls

  • ✘ `loading="lazy"` on the LCP image. Lazy images are only fetched after layout + IntersectionObserver evaluation — commonly +600 ms on 4G. This single attribute is the most common LCP regression in modern frameworks.
  • ✘ Preloading an image that is also in the initial HTML with a mismatched `imagesrcset`. You get two downloads, contention on the same connection pool, and a *worse* LCP.
  • ✘ Marking more than ~2 resources `fetchpriority="high"`. Priority is relative; five heroes equal none.
  • ✔ Budget the sub-parts, not the total. Alert on resourceLoadDelay > 100 ms (discovery problem) and elementRenderDelay > 100 ms (main-thread/render problem) as distinct signals — they have completely different owners.
  • ✔ Tail-keep your RUM. 10% head sampling plus 100% of non-good metrics beats 100% collection of everything, and it catches the interactions that define INP.
  • ✘ Trusting Lighthouse for INP. TBT is a lab proxy that ignores presentation delay entirely. A page can score green on TBT and be 400 ms INP in the field.
  • ✘ Aggregating p75 client-side or averaging percentiles. Averages of p75s are meaningless; keep raw events, quantile in SQL, and always print the sample count next to the number.
  • ✘ Ignoring bfcache. On restore, web-vitals starts a new Metric with navigationType: 'back-forward-cache'; if your collector assumes one record per session, you will double-count.
  • ✔ Guard prerendered documents. No analytics pageview, no websocket connect, no autoplay until prerenderingchange fires.
  • ✔ Ship `size-adjust` font fallbacks — it is a 10-line CSS change that removes the single largest source of CLS on content sites.
  • ✔ Version your RUM payload with the commit SHA. Without appVersion, every regression investigation starts with a manual archaeology session.

Frequently Asked Questions (FAQ)

What is a good INP score, and how is it actually measured in the field? Good INP is ≤ 200 ms at the 75th percentile of real user interactions over a 28-day window (needs improvement 200–500 ms, poor > 500 ms). The browser groups each interaction (e.g. pointerdown → pointerup → click on the same element) by interactionId, keeps the longest duration per group, and reports a high percentile (≈p98) of those maxima for the page load; CrUX then quantiles across page loads. Because one slow interaction can define the score, optimize the tail: defer third-party tags, break long tasks below 50 ms, and yield with scheduler.yield() or scheduler.postTask({ priority: 'user-visible' }).

Does `fetchpriority="high"` on my hero image hurt other resources? It depends on the network queue. fetchpriority is a hint that re-orders Chromium's fetch priority classes — it does not create bandwidth. Raising one hero from Low/Medium to High is a large net win (typically 300–600 ms of field LCP) because the hero is the render-blocking resource. Raising five resources to High flattens the queue and gains nothing. The safe pattern is: exactly one fetchpriority="high" resource, the LCP font preloaded with crossorigin, and below-fold media explicitly fetchpriority="low" with loading="lazy".

How is CrUX field data different from my own RUM, and which should I trust? They answer different questions and you need both. CrUX is a public dataset of real Chrome users, aggregated as a 28-day rolling p75 at origin level (URL level only for sufficiently popular URLs) — it lags by up to four weeks and cannot be segmented by route, device, or deploy. That said, CrUX is the dataset the page-experience ranking signal is computed from, so it is the number that matters commercially. First-party RUM is minutes-fresh, segmentable by appVersion, route, and connection type, and is the only tool that can bisect a regression to a specific commit. Reconcile them: if RUM shows a fix and CrUX hasn't moved after 28 days, your sample or your route grouping is wrong.