How to improve your website’s speed: measure, fix, compare
Locate the delay: does the server respond late, is the image delayed, or is the button waiting for busy code? Measuring these situations separately helps you choose a useful correction and preserve the design. A single score does not explain the visitor’s experience.
By the end, you can:
- Distinguish loading, responsiveness and stability
- Choose the first correction based on diagnosis
- Compare results under the same conditions
Describe the symptom before choosing the tool
Observe when useful content appears, when you can act and whether elements move as you read. Note the URL and action. The homepage, gallery and form may have different causes; a global change may not fix a slow resource on a single page.
Start with the main journey. If slowness occurs when selecting a filter, test that interaction. If it occurs only on a first visit, compare navigation without cached files and with caching. Record extensions, device and connection so the conditions can be reproduced.
- Response
The server starts returning the page.
- Content
Text and the main image become visible.
- Interaction
Menus, fields and actions respond.
- Stability
The layout stays in place during use.
Read the metrics with the right question
Core Web Vitals describe loading, responsiveness to interactions and visual stability. To assess real experience, Google’s thresholds apply at the 75th percentile of visits, assessed separately for mobile and desktop. That means evaluating a set of uses, not turning a quick measurement on your computer into a classification of all visitors.
Field data comes from real use; laboratory tests help reproduce and investigate behaviour. If a new website does not yet have enough field data, keep a laboratory baseline with explicit conditions. In PageSpeed Insights, read the label on each block to distinguish the data sources.
| Metric | Question | Good-experience threshold |
|---|---|---|
| LCP | When does the largest visible text block or image appear? | Up to 2.5 s at the 75th percentile |
| INP | How long does the page take to display a response to interactions? | Up to 200 ms at the 75th percentile |
| CLS | How much does the layout shift unexpectedly? | Up to 0.1 at the 75th percentile |
| TTFB | When does the server response start arriving? | Diagnostic indicator; not a Core Web Vital |
Prepare a comparison you can repeat
Choose a URL, an action and a condition. For example, in an illustrative test: open the services page, wait for the main content, open the menu and start the form. Keep the same configuration before and after the change. Run the test several times rather than choosing only the best result; record the typical value and observed variation.
Keep the report, version, URL, date and conditions, including any network or device simulation. The next test should assess the hypothesis behind the change: reducing an image, splitting JavaScript work and reserving space in the layout have different effects.
- Separate a first visit from a cached visit.
- Keep the same page, width and network mode in the comparison.
- Measure the slow action as well as the initial load.
- Review appearance and functionality after each correction.
- Note other changes that could affect the result.
Deliver the right image at the right size
Start by identifying the LCP element. If it is a main image, check whether the browser discovers it early, requests a suitable size and can use visually acceptable compression. Do not lazy-load an image that needs to appear immediately. Use lazy loading for images further down, after checking when the actual requests start.
Size variants let you serve files suited to the available space. Declared dimensions help reserve that space before the image arrives. The example below is illustrative: the files must exist and sizes must match the actual design. Alternative text describes the image’s function; it should not accumulate keywords.
In a fictitious example, converting a photograph from 900 kB to a 270 kB variant removes 630 kB from that resource. It does not demonstrate a 70% improvement in website speed. Check sharpness, colour and framing on relevant screens, then measure the whole page again.
<img
src="/imagens/oficina-960.webp"
srcset="/imagens/oficina-480.webp 480w,
/imagens/oficina-960.webp 960w"
sizes="(max-width: 48rem) 100vw, 50vw"
width="960" height="640"
fetchpriority="high"
alt="Workshop area with neatly arranged equipment"
>Reduce work during actions and reserve space
When the page appears quickly but responds poorly, investigate the work performed when clicking, typing or opening a menu. A script may analyse a large list, create many elements or recalculate layout before displaying a response. The correction depends on the trace: it may involve reducing work, splitting it into stages or postponing what the current action does not need.
For layout jumps, look for images without reserved space, notices that push content and font swaps that greatly change text geometry. Do not hide essential content until an animation ends. Motion can remain, but it should keep controls stable and respect the reduced-motion preference. Check menus and error messages after optimisation, because speed without an understandable response does not fix the journey.
Use caching without hiding updates
If the initial response is slow, investigate the chain that produces it: redirects, server, required queries and external services. A distribution network helps serve content near the visitor, but it does not automatically fix a slow call or a request that cannot be reused. Observe what actually reaches the browser and whether the resource came from the network or cache.
Static files with versioned names can have a long cache policy: when their content changes, their URL changes too. A file repeatedly replaced at the same path may remain outdated in the browser if the policy prevents timely updates. Personalised pages and private data need their own policies. Do not apply the rule for public images to responses containing customer information.
Choose one correction and document the result
Prioritise a cause that affects the main journey and that you can confirm. A heavy gallery below the fold may be less urgent than a main image discovered late. A small library running on every keystroke may be more disruptive than a larger file that remains idle. The decision combines observation, impact and the risk of changing functionality.
After publishing, confirm the new version is being served and repeat the same test. Record what improved, what stayed the same and any regression. Do not attribute a sales change to this intervention without appropriate commercial measurement. The worksheet helps communicate the result to the business lead and the technician who will carry out the next review.
| Symptom | First investigation | Confirmation criterion |
|---|---|---|
| Main content is delayed | Server, discovery and size of the LCP element | The same content appears earlier in a comparable test |
| Action seems stuck | Work performed during the interaction | The response appears without blocking the journey |
| Elements jump | Space for images, notices and fonts | The layout stays in place during the test |
Worksheet for your project
Page and action observed: Date and version: Device, browser, width and network: Cache: first visit or repeat visit? Data source: field or laboratory? Symptom and responsible element: Results before, with observed variation: Hypothesis and change carried out: Results after, under the same conditions: Visual and functional checks: Risks or problems that remain: Next decision and person responsible:
Sources and criteria
Content prepared with AI assistance and research using technical sources, with checks of the relevant examples and calculations. The references support the guide’s decisions; examples identified as fictitious let you try out the method.
