
A slow page is rarely fixed by minifying every file or installing another optimization plugin. Start with a page your visitors use, find the delay they experience, and make the smallest change that addresses it. This is especially useful for an independent developer or small business: it avoids spending time on optimizations that do not improve the actual bottleneck.
This guide covers how to measure page performance and improve loading, responsiveness, and layout stability. The recommendations follow current browser guidance; they are not a promise that any single change will produce a particular score.
Measure before changing the page
Use PageSpeed Insights to review available field data and a lab test. In Chrome, the Performance panel can help you inspect what the browser is doing during a page load or interaction.
Google's Core Web Vitals describe three parts of user experience:
| Metric | What it measures | Good target |
|---|---|---|
| Largest Contentful Paint (LCP) | How quickly the main content appears | 2.5 seconds or less |
| Interaction to Next Paint (INP) | How quickly the page responds to interactions | 200 milliseconds or less |
| Cumulative Layout Shift (CLS) | How much visible content shifts unexpectedly | 0.1 or less |
These targets apply at the 75th percentile of page visits, considered separately for mobile and desktop. Field data reflects real visits over time; a lab run is a controlled diagnostic and may behave differently from a visitor's device, network, or location. Low-traffic pages may not have enough field data to appear in every report.
Choose one representative page and record its starting measurements. Keep the test conditions consistent when you check again, and note both the metric and the problem the browser report points to. A score alone does not tell you which asset or interaction needs work.
Improve the main content's loading priority
LCP is often affected by a slow server response, render-blocking resources, or an image that the browser discovers too late. The LCP optimization guide recommends addressing the actual delay rather than applying the same fix to every page.
Start with the page's largest visible content:
- If the server takes a long time to return the document, check hosting, backend work, and caching before focusing on front-end minification.
- Make the main image discoverable in the initial HTML where possible. An image inserted later by JavaScript can start loading later than one the browser sees immediately.
- Do not lazy-load the LCP image. Lazy loading is meant to defer images that are not initially visible; applying it to the main image can delay the content visitors came to see.
- Consider
fetchpriority="high"for the main image when it is genuinely the most important resource. It is a browser hint, not a guarantee, and should not be applied to every image. - Avoid preloading assets without evidence that the browser discovers them too late. Preloading too many resources can compete with more important work.
For repeat visits, a suitable cache policy can reduce requests for static assets. Use versioned asset URLs when files change, and set cache rules that match how the files are updated. Do not put personalized pages or private responses in a shared public cache. The MDN HTTP caching guide explains the difference between browser and shared caches.
Reduce image cost without causing layout shifts
Large images can consume bandwidth and delay rendering, especially on mobile connections. Resize images to the dimensions they are displayed at, choose an efficient format for the content, and provide responsive sources so a small screen does not download a needlessly large file.
The HTML image element documentation covers srcset, sizes, loading behavior, and image priority. Give images their actual width and height so the browser can reserve space before the files arrive. This also helps prevent content below an image from jumping.
For images below the initial viewport, loading="lazy" can defer network work until the image is closer to view. Do not apply it indiscriminately: keep important above-the-fold images eager to load, and check the page on mobile as well as desktop. If you are using WordPress, our guide to speeding up a WordPress site covers CMS-specific options; confirm that any plugin or hosting recommendation still fits your current setup.
Make interactions respond sooner
Heavy JavaScript can keep the main thread busy, delaying clicks, taps, and keyboard interactions. The INP guide recommends diagnosing slow interactions and reducing work that blocks the next visual update.
Begin with scripts that are not needed for the initial page:
- Remove unused libraries and features, or load them only on pages that need them.
- Split large application code so an initial visit does not have to parse and execute every feature.
- For classic external scripts,
deferdownloads the file without blocking HTML parsing and runs it after parsing, in document order.asyncruns a script as soon as it is available and does not preserve execution order, so use it only when the script is independent. Check the MDN script element documentation before changing dependencies that rely on order. - Review analytics, chat widgets, video embeds, ad scripts, and other third-party code. Remove tools you no longer use, and avoid loading optional code before it is needed.
Do not remove an essential interaction or accessibility feature just to reduce a metric. After changing scripts, check that forms, menus, validation, keyboard navigation, and error states still work.
Prevent unexpected movement
CLS increases when visible content shifts after it appears. Common causes include images without dimensions, ads or embeds inserted without reserved space, and banners that push content down after a visitor starts reading.
Reserve space for media and other elements whose size is known. For a video container with a 16:9 shape, for example:
.video-frame {
aspect-ratio: 16 / 9;
}
When an element's final height is not known, use a reasonable reserved size or place it where it will not displace content the visitor is already using. Test delayed-loading content and font changes on narrow screens too. The CLS guide explains how to identify and investigate layout shifts.
Keep CSS and rendering work focused
Stylesheets in the document can delay the first render. Remove styles that the page does not use and avoid loading large, site-wide bundles on pages that need only a small part of them. Splitting CSS or inlining critical styles can help in some cases, but it adds complexity; use browser diagnostics to confirm that CSS is the bottleneck before changing the build.
Performance improvements should preserve readable text, visible focus indicators, reduced-motion preferences, and a useful experience while scripts or images load. Test the change in the browsers and devices your visitors actually use, not only in one desktop lab run.
A practical order for a small site
- Pick a page that matters to visitors, and record available field and lab measurements.
- Fix a clearly identified delay to the main content, such as a slow response or late-loading hero image.
- Resize and prioritize images; lazy-load only those below the initial viewport.
- Reduce scripts that block rendering or keep the main thread busy, paying particular attention to third-party code.
- Reserve space for images, ads, and embeds, then recheck the metrics and the page's real interactions.
Make one group of changes at a time so you can see whether it helped. If a score improves but the page becomes harder to use, the tradeoff is not worthwhile. Keep the fix only when it improves the experience without breaking functionality, accessibility, or browser support.