Core Web Vitals: What to Fix First on a Slow Website

Start with the Core Web Vital that fails for real visitors, then fix its measured cause. Slow LCP often points to a late or oversized main image, slow server response, or render-blocking resources; poor INP often points to long JavaScript tasks; and high CLS means elements move unexpectedly. Prioritize images, caching and JavaScript according to that diagnosis.

Tanvirul Islam Tusher beside an illustrative dashboard for LCP, INP and CLS
Graphic from my LinkedIn post. The dashboard scores and timings are illustrative, not measurements of this website.

A beautiful website can earn a visitor’s attention, but it still has to load promptly and respond when they use it. That is the point behind my LinkedIn post on web performance. This guide takes the three metrics in that post and turns them into a way to decide what to fix first.

What are Core Web Vitals?

Core Web Vitals are three measurements of the experience people have while loading and using a page. Google evaluates them using the 75th percentile of real visits, separately for mobile and desktop. A green lab score from one test is useful for diagnosis, but it does not replace data from visitors.

Metric What a visitor notices Good result
Largest Contentful Paint (LCP) The main image or text appears 2.5 seconds or less
Interaction to Next Paint (INP) A click, tap or key press gets a visible response 200 milliseconds or less
Cumulative Layout Shift (CLS) Content stays in place as the page loads 0.1 or less

Those are Google’s published thresholds. They are targets for most visits, not promises that every individual visit will be identical.

Which problem should you fix first?

Open the URL in PageSpeed Insights and check whether it shows real visitor data. If it does, look at mobile and desktop separately and begin with the metric in the poor range. If it does not have enough visitor data, use its Lighthouse report and Chrome DevTools to find likely problems, then check again when field data becomes available.

Do not pick a fix because it sounds fashionable. Look at the slow page, identify the element or interaction behind the result, and change that cause. A useful first pass is:

  1. Slow LCP: find the reported LCP element and check when its bytes start loading. Is it the hero image, a text block waiting on fonts, or a page held up by a slow HTML response?
  2. Slow INP: record the interaction that feels delayed. Is JavaScript keeping the main thread busy before the handler runs, inside the handler, or before the next paint?
  3. High CLS: watch what moves. Is an image missing dimensions, an ad or embed appearing without reserved space, or a font changing the size of text?

The answer also depends on the page. A landing page may be dominated by one large image; a dashboard may load quickly but respond slowly after a filter click. Measure the page and device people actually use.

When is image optimization the priority?

Start with images when the LCP element is an image and the browser spends significant time loading it. Serve an appropriately sized file, choose a suitable format such as WebP or AVIF, and give responsive images a sizes value that matches their real layout width. Compressing an image to a tiny file is not a win if the result looks poor.

Make the main image discoverable in the initial HTML and load it promptly. Do not lazy-load an LCP image. Images below the first screen are good candidates for lazy loading. Set intrinsic width and height, or an aspect ratio, so the browser reserves space before they arrive; that also helps CLS.

When does caching matter most?

Caching is high priority when repeat visits or visitors far from the origin wait too long for HTML or static assets. Check the actual response headers and the time to first byte from the regions your visitors use. Cache assets with versioned filenames for a long time. For HTML, choose a cache lifetime that matches how often content changes, and make sure publishing a new version invalidates the old one.

The distinction between browser cache and edge cache matters. Browser cache helps a returning visitor. A content delivery network can shorten the trip for a visitor far from the server. On this site, caching HTML at the Cloudflare edge reduced measured time to first byte from Europe from 654 ms to 126 ms. That is a result from this site’s earlier case study, not a result promised for every site.

When should you reduce JavaScript?

Reduce JavaScript when interactions are delayed or when scripts hold up the first render. A script costs more than its download size: the browser also parses and runs it. Third-party tags, large client frameworks, and work done after every click can all contribute to poor INP.

Begin with scripts that do no useful work on the page. Then split work so an interaction can show feedback promptly, avoid expensive work in event handlers, and load optional features only when needed. INP includes the delay until the next paint, so making a handler return quickly is not enough if the interface still cannot update.

Rendering strategy belongs in this decision too. If content can be delivered as HTML, rendering it on the server or at build time can avoid asking every visitor’s device to construct the page first. A dynamic application may still need client-side JavaScript; the goal is to send only what that interaction requires.

How do you keep the layout stable?

Give images and video space before they load. Reserve a slot for embeds, ads and banners. Avoid inserting new content above the text somebody is reading. Check font loading too: a fallback font with very different dimensions can shift headings and paragraphs when the final font appears.

CLS deserves its own check even if the site feels fast. A page can load its main content quickly and still move a button just as someone tries to tap it.

A practical order for the next hour

  1. Test one important URL on mobile and desktop in PageSpeed Insights. Record the date, device and whether the result is field or lab data.
  2. Pick the worst Core Web Vital and inspect its reported element, interaction or shifting area in Chrome DevTools.
  3. Make one change aimed at that cause. Examples: resize the LCP image, cache HTML nearer visitors, remove an unused script, or reserve space for an embed.
  4. Run the same test again and compare. Keep monitoring real visitor data because one Lighthouse run cannot prove a lasting improvement.

If all three vitals are already good, focus next on whether the page is clear, accessible and useful. Google’s guidance on page experience does not turn speed into a substitute for relevant content. The same applies to AI search: Google’s AI features guidance says there is no special markup or AI-only file required to appear. A crawlable page that answers the question with useful, specific information gives both people and search systems something worth finding.

If you want to see what these choices looked like on a real project, read how this Astro site reached a 100/100 page speed score. The scores are lab results, and the post also records what the test could not prove.