The page has loaded, but the user on their phone is still waiting for the buttons to respond to a tap. To improve website speed, you don't start by installing a plugin or switching hosts. You start by measuring the user journey that matters and finding the main bottleneck. Then you fix that one part and test again. Otherwise you have no idea what your change actually solved.
Where does improving website speed start?
With the problem the user feels, not just the number a tool shows. Imagine a visitor lands on a product page from an ad. The photo and price are there, but the “Add to cart” button ignores their tap for a moment. To them, the site is slow, even if the page “opened” quickly.
So site performance has three parts: showing the main content early, responding quickly to clicks and taps, and keeping the layout stable. Improving website speed means getting better at all three, not just shaving off load time.
Before you open any tool, write the key user journey down on paper. For example: arriving from search, viewing a product, adding it to the cart. Then describe the symptom precisely. Where did it happen, on what device, and what was late? Now you know what to measure.
This guide focuses on diagnosing problems and signing off on fixes. If you just want a short list of quick wins, we've covered quick ways to improve site loading speed separately.
Also drop the famous rule that “users leave after three seconds.” That number has no clear backing for every site, or for today's users in Iran. The link between speed and sales has to be measured in that business's own data.
If you use bounce rate as a yardstick, know how GA4, Google's analytics tool, defines it. Bounce rate is the percentage of sessions without engagement. A session is the set of things a user does during one visit. A session counts as engaged if it passes the configured time threshold, records a key event, or includes at least two page views. The threshold defaults to 10 seconds, so a single-page visit isn't necessarily a bounce.
Which metrics matter in a website speed test?
To track your progress, follow the three Core Web Vitals. Each one measures one of those three parts of the user experience:
Largest Contentful Paint (LCP): when the largest image or text block on the page appears on screen.
Interaction to Next Paint (INP): how long it takes from a user's click or tap until the page visibly responds.
Cumulative Layout Shift (CLS): how much page elements move around unexpectedly while the page loads.
Metric | What it measures | Good threshold |
|---|---|---|
LCP | How fast the main content appears | 2.5 seconds or less |
INP | Responsiveness to interaction | 200 milliseconds or less |
CLS | Layout stability | 0.1 or less |
CLS has no unit, by the way. It isn't seconds or pixels. The score comes from the size of the area that moved and how far it moved.
Google assesses these thresholds at the 75th percentile. In other words, at least three-quarters of recorded experiences must fall in the good range. The report also assesses mobile and desktop separately, and a green desktop result tells you nothing about mobile. For more detail, see the definition and measurement method for Core Web Vitals.
If an old report or contract still mentions First Input Delay (FID), update it. Since March 12, 2024, INP has replaced FID. FID only looked at the delay of the very first input, so signing off a project on it ignores responsiveness across the rest of the visit.
To improve website speed, first identify which of these three metrics is in the poor range. You'll often see a fourth number too: Time to First Byte (TTFB), the gap between the browser's request and the arrival of the first piece of the server's response. But TTFB isn't one of the Core Web Vitals. It's a diagnostic clue that tells you whether the waiting starts on the server and network side.
How should you read a PageSpeed report?
First, find out where each number comes from. Is it a lab test or real users' experience? PageSpeed Insights shows the two separately. The field data section comes from the Chrome User Experience Report (CrUX), which reflects real Chrome users. Lighthouse runs the lab section under controlled conditions, and the famous colored score comes from there.
Field data covers a rolling 28-day window. Sometimes the report is for that exact page URL, and sometimes for the whole origin, meaning all the pages on that domain. If the page doesn't have enough samples, its page-level data stays empty. The guide to reading PageSpeed Insights data explains these differences in detail.
Picture a hypothetical report. The product page has no field data, and the origin data looks good. The mobile lab test, however, shows the browser starts fetching the main image late.
Still, neither one is a final verdict on its own. Origin data can bury this page's problem inside the numbers for the whole domain. The lab test reflects only one device on one simulated network. For now, the main image is your first hypothesis. You still need to see how it behaves on a real phone.
This gap also explains why users feel slowness despite a good score. A standard Lighthouse run only measures loading, and nobody clicks anything, so it can't measure real INP. Total Blocking Time (TBT), the total time long browser tasks prevent the page from responding, is only a lab hint at it.
Two other tools are useful when you're working to improve website speed:
WebPageTest: shows the order and timing of every resource download in a waterfall chart. Use it to find the resource that arrives late.
GTmetrix: produces a Lighthouse-based report and assesses the page's performance and structure separately.
But more tools or data sources don't automatically mean more accuracy. Keeping test conditions identical matters more. If you're going to track just one thing, watch field data for the three metrics on mobile, not the colored score.
How do you test mobile for users in Iran?
Build a small table of test conditions and run it on a real phone over a real network. Online tools usually test from servers outside Iran, so they don't fully reflect what a domestic user experiences. Improving website speed on mobile starts with this table:
Variable | Test conditions |
|---|---|
Device | A common mid-range phone, not the tech team's flagship |
Network | Mobile data and fixed broadband |
Carrier | At least two widely used carriers |
VPN | Record whether it was on or off for each run |
Cache | A first visit with an empty cache and a repeat visit with a warm cache |
For every run, note the device, network, time and page URL. The cache is the stored copy of resources that the browser or server reuses. Record its state too. Without these notes, next week's results can't be compared with today's.
Why is a site fast on a computer and slow on a phone? A mid-range phone's processor runs JavaScript, the page's executable code, more slowly. Mobile networks fluctuate more, too. Sometimes the site sends phones an oversized image, and the browser has more work to do laying out the page. Being responsive only means the layout fits a small screen. It doesn't guarantee speed.
That's also why the score changes on every run. Server load, network conditions, third-party resources and cache state are never constant. Take several runs under the same conditions and report the median, not the best result.
Also note that Google retired the Mobile-Friendly Test tool and the Mobile Usability report on December 1, 2023. The practical replacement is a real phone. Tap the buttons, read the text, open and close the menu, and fill in the forms yourself. For layout details, see our look at responsive website display.
As for Accelerated Mobile Pages (AMP), let the project's needs decide. This format for building lightweight mobile pages isn't the default path to a faster site, and it carries no ranking advantage on its own.
How do you find the main bottleneck from the symptoms?
Tie each symptom to a specific point in the timeline. The bottleneck is whichever part creates the most waiting. You have two tools for this: the request waterfall chart and a recording of browser activity in the Performance tab of the developer tools. The first shows the order and duration of resource downloads. The second shows what the browser was busy with at every moment.
The first thing I usually do is break LCP into four parts:
Time to first byte: until the first piece of the document arrives from the server.
Resource load delay: the gap between the document arriving and the main image or font starting to download.
Resource load duration: the download time itself.
Element render delay: from the end of the download until the element actually appears on screen.
So shrinking the image only treats the third part. If most of the time sits in the second part, a lighter image makes almost no difference. This breakdown points you to the right place to look:
Symptom | Where to look |
|---|---|
The initial response arrives late | Network and server |
The main image starts downloading late | Resource discovery in the initial document |
A click or tap goes unanswered | Code execution and long browser tasks |
Text or buttons jump around | Fonts and element dimensions |
Log every case with the same template: symptom, hypothesis, evidence, scoped change, success metric and rollback method. With this template, “I think it got better” stops being an acceptance criterion.
So how do you set priorities? When you improve website speed, a problem moves up the list if it:
sits on a key user journey;
affects many pages;
has a measurable impact;
is low-risk to fix.
A long list of equally weighted recommendations keeps the team busy, but users may not feel any difference.
Optimization starts when you understand what the user is waiting for.
When do you need to fix hosting or use a CDN?
When the evidence shows the waiting happens on the network path or in resource delivery, not in application processing. A high TTFB isn't just a sign of weak hosting, meaning the place your application runs. Network distance, application processing, database queries and missing caches can each push it up. So before you try to cut server response time, find out how much each one contributes.
A content delivery network (CDN), on the other hand, serves your site's resources from multiple locations closer to the user. Hosting is where the application runs. A CDN is the route files take to reach people. The two aren't interchangeable, and sometimes you need both.
To compare, put an identical page on each option: domestic hosting, foreign hosting and a CDN. Then test from the networks of the users you actually built the site for. A “cloud” or “dedicated” label tells you nothing about how fast your users will see the site. We've covered other sides of this decision in our comparison of domestic and foreign hosting.
When you're working to improve website speed, this rule simplifies the decision:
If the waiting is in application processing or the database, moving the server to another location isn't necessarily the cure. Review the code and the queries.
If the document arrives early but images and static files arrive late, look at the delivery path and caching.
If responses are slow from inside Iran but fast from abroad, take the network path to your target users seriously.
Before choosing any service, get clear answers on:
stable access from inside Iran;
terms of use and whether you can actually pay for it;
a fallback if the service is cut off or restricted;
how dynamic parts like the shopping cart and user login behave.
In practice, the answer to “domestic hosting or CDN?” comes from testing on your users' networks, not from a blanket rule.
Evaluate security features separately, too. Fast content delivery is one thing, and defending against attacks is another. Not every CDN offers the same security features.
How do you get the page's main image on screen sooner?
First find the actual LCP element. Then make it light and correctly sized, and let the browser discover it early. The LCP element isn't always the hero banner, though. On an article page it might be the headline or the first paragraph, and on mobile it might be a different image. Identify it separately in the developer tools for each page type and each screen size.
Image optimization starts with dimensions. An image displayed about 400 pixels wide on mobile doesn't need a 2,000-pixel version, even on a high-density screen. Build responsive versions with the srcset attribute, which offers the browser several sizes of the same image. Try the WebP or AVIF image formats as well.
Compression comes in two kinds. Lossy compression discards some of the image data. Lossless compression keeps all of it. If the eye can't spot a difference, the loss is small, not zero. Compare before and after side by side at the real display size, especially product photos and text over images.
A smaller file isn't enough, because discovery time matters too. Exclude the main image from lazy loading, which delays downloading until an image nears the visible area. Its source should be visible in the initial HTML, the document that defines the page structure, rather than being built later by JavaScript. Give high fetch priority (fetchpriority) to this one resource only. When everything is a priority, nothing is.
Consider this common hypothetical situation:
Before: a JavaScript slider builds the main image and a plugin lazy-loads it. The browser doesn't know the image exists until the code runs.
After: the image is in the initial document, isn't lazy-loaded and has high priority.
Measure the result with the same four LCP parts. You'd expect the biggest change in resource load delay. On many sites, this is one of the cheapest steps you can take to improve website speed.
By contrast, do lazy-load images further down the page. And set a width and height, or an aspect ratio, for every image so the browser reserves their space in advance and the layout doesn't jump.
Which code changes speed up rendering and interaction?
Prioritize changes that reduce the browser's workload, not just file size. Minifying code (minify) strips out whitespace, comments and long names. Transfer compression such as Brotli or gzip shrinks a file in transit, and the browser unpacks it again. Both help, but the browser still has to parse and run all of the code.
That's why better INP means running less code:
Find and remove unused code with the Coverage tab, the part of the developer tools that shows how much of your code is actually used.
Load code per page. An article page doesn't need the product slider's code.
Break up long browser tasks so there's room between them to respond to a tap.
Render-blocking resources are files the browser waits for before it paints anything. They're usually CSS, the rules that define how the page looks, and synchronous scripts at the top of the document. Inline the critical styles for the top of the page and load the rest later. But check the initial appearance at several screen sizes so the page doesn't show up looking broken.
The async and defer attributes control when a script runs, and they're often explained wrong. The browser downloads an async script in parallel and runs it as soon as it's ready, and that execution can pause document parsing. A classic script with defer runs after parsing finishes and before the DOMContentLoaded event, the signal that the document structure is ready. It doesn't wait for all the images to download.
Bundling every file into one big file is no longer a general rule, either. With HTTP/2, the second version of the web's transfer protocol, the browser fetches several resources at once over a single connection. Meanwhile, one large file invalidates the whole cache with every small change. Decide based on transfer size, caching and testing. Cutting the number of requests isn't a goal in itself.
When I work to improve website speed, silent breakage in this area worries me most. After every change, test script dependencies and execution order. If you defer a library that an inline script depends on, for example, a menu or form might quietly stop working.
How do you set up site caching without risking user data?
Draw a precise line between public and personal pages, and test that line with several accounts. Caching means keeping a ready copy of something that was already built or fetched. The browser cache keeps repeated files like CSS, fonts and the logo on the user's device. A server-side cache keeps a ready page or data so the server doesn't have to rebuild it every time.
Imagine someone opens an article page for the first time. Their browser cache is empty, so everything comes over the network. On the second visit, the font and styles load from their own device. So the browser cache doesn't speed up the first visit. That's where the server cache and CDN come in.
The shopping cart, user account and checkout, however, return personal responses. Don't put these in a shared cache unless you've deliberately designed its cache key and retention policy. The cache key determines which request each stored copy belongs to. Headers, the instructions that travel with a response, such as Cache-Control: private or no-store, tell the browser and intermediate servers how a response may be stored.
To be sure, repeat this test after every caching change:
Open the account and cart pages with two different accounts and one private browsing session.
Make sure no other user's name, order or cart appears on the page.
Check application programming interface (API) responses too, the channels parts of the software use to exchange data. Leaks sometimes come from there, not from the page itself.
Decide how the cache gets refreshed in advance. When a price or stock level changes, the product page mustn't show a stale version. Version your code files as well, so the file name or URL changes with each release and the browser doesn't hang on to the old copy.
Then record the cache headers for each page type and test three cases: a fresh visit, a repeat visit and a visit after an update. When you improve website speed, a toggle switched on in a plugin isn't proof of success.
A shared cache must never erase the boundary around users' personal data.
Where do Persian fonts and third-party resources hold the site up?
Downloading unused font weights and waiting on a slow third-party service can both hold up a page. To improve website speed, start this review with your Persian font:
List the weights the design actually uses. In many designs, two or three are enough.
Serve a web-specific format such as WOFF2 and stop loading unused weights.
Preload only the font for text at the top of the page, not every weight.
Use font-display, the property that controls how text is shown while the font downloads, to define what happens before the font arrives, and pick a fallback font with similar dimensions.
Then check on a phone that text is visible before the font arrives and that lines don't shift when it swaps in. A Persian font with a different line height can easily push CLS up.
Next, find the third-party resources in the request chart: external fonts, live chat, analytics and maps. Measure each one on a network inside Iran. A tool that responds slowly from Iran can sometimes hold the whole page up.
The practical approach is to load non-essential tools only when the user needs them. For example, load the map when the user taps its preview. Agree with the business owner before removing a tool entirely, and check the effect on event tracking and features. This part of the work takes more coordination than coding.
If the font's license and terms allow it, host it on your own domain. So fixing network waits doesn't always mean giving up a custom font.
In WordPress, what matters more: the theme or the number of plugins?
Measure the real cost of the theme and each plugin, not just how many plugins you have. Several small, focused plugins may be lighter than one all-in-one plugin that injects code into every page. The reverse can be true too, so counting plugins isn't enough to make a decision.
To improve website speed and optimize WordPress, measure the cost of each feature in a staging environment, a copy separate from the live site:
the requests it adds to the page;
the JavaScript and CSS it runs in the browser;
server processing time;
the number and duration of database queries.
Then disable one feature at a time. Take a backup first and define your rollback path. Risky tests on live payments are off-limits. Test the payment gateway only in test mode.
To isolate the theme's cost, build a simple page without a page builder and compare it with a page made with the page builder. If the simple page is also slow, look for the problem in the theme or the server, not in the content or page-building tools.
So should you switch hosts or fix the theme? Browser and server evidence decides. If TTFB is high even on the simple page, look at the server and database. If the server responds quickly and the browser is busy running code, migrating won't solve anything. One slow page isn't a reason for a full migration, either. Take that page apart first.
How do you retest redirects and fixes?
Remove unnecessary chains, measure before and after under identical conditions, and check that critical journeys still work after every change. A redirect chain is when the first URL sends you to a second and the second to a third. Each hop adds a network round trip, which costs more time on mobile data.
Point internal links, the menu and the sitemap directly at the final destination. But don't remove redirects you still need. Old URLs and migration paths still get visits and links. Shorten the chain to a single hop and keep the correct destination so nobody loses access to the page.
A before-and-after comparison only means something when the device, network, cache state and page are the same. Make one scoped change per round. Otherwise you won't know which fix had the effect.
After every change to code, caching or third-party resources, test these journeys by hand:
A full purchase through to the test payment gateway
Submitting a form and the message reaching its destination
User login and logout
Search and the menu on mobile
Essential events being recorded in your analytics
For a fuller list, keep our website testing and handover checklist close at hand. If a result is bad, revert the change and log the failed attempt too.
A faster site with a broken checkout isn't optimization. All you've improved is a tool's score.
When do optimization results show up in real data?
You'll see a fix's effect in lab tests the same day, but in field data it shows up gradually over about 28 days. Chrome user data is a rolling 28-day window. On release day, most of that window still holds pre-fix experiences, and the share of new data grows each day.
Even so, if a page gets little traffic, it may still have no field report after the fix. Origin data can also hide one page's improvement or problem among the numbers for the whole domain.
The more precise route is real user monitoring (RUM): measuring the metrics in your visitors' own browsers and sending them to your analytics. This takes implementation work. GA4 doesn't build a comprehensive speed report on its own.
So collect data broken down by page type, device and release version. Collect only what you need and respect users' privacy. That breakdown shows which release moved your site speed forward and which one set it back.
Does a score of 100 improve rankings? Google uses Core Web Vitals in its page experience assessment and ranking systems. But a good score, or even a perfect one, doesn't guarantee a high ranking. The goal is a good experience for real users, not the number 100.
How do you write an action plan and speed acceptance criteria?
Put three things side by side: a performance budget, acceptance criteria for each page type, and an action sheet with an owner and a rollback path. A performance budget is an agreed ceiling on resource size and code execution cost under defined test conditions. Derive its numbers from your current state and your users' needs, not from an off-the-shelf template.
Fill in the table below for your four main page types. The test conditions are the same as in the mobile table, and the team sets the resource budget for each row from the baseline, meaning measurements taken before any fixes.
Page type | Critical journey | Target metric | Health check |
|---|---|---|---|
Home page | Arriving and moving to categories | LCP and CLS in the good range on mobile | Menu and search |
Product | Viewing a product and adding to cart | LCP and INP in the good range | Cart through to the test gateway |
Article | Reading the text and moving to the next link | LCP and CLS in the good range | Reading event recorded |
Form | Filling in and submitting | INP in the good range | Message delivered and event recorded |
Then make one person responsible for follow-up. After every release, and whenever a new plugin, font or marketing tool is added, they rerun these tests. Without an owner, the gains you made can quietly disappear a few months later.
For every issue, hand the tech team an action sheet with these sections:
Problem: the exact symptom and the affected page
Evidence: a report, chart or browser activity recording
Priority: based on the key user journey and the risk of the fix
Owner: one specific name
Acceptance criterion: the target number under the recorded test conditions
Rollback plan: if the result is bad, what gets reverted and how
All that said, the cheapest time to deal with speed is before the site is built. When a performance budget and acceptance criteria are in the plan from day one, you won't have to tear the site apart later. If you have a new project coming up, you can define these measurable criteria from the start with Niasa's web design services.
Keep the first step small. This week, pick one important journey and test it on a mid-range phone. Then log the first bottleneck using the symptom, hypothesis and evidence template. If you want to improve website speed, that one sheet will do more for you than a long, unprioritized list of fixes.
اگر برای ساخت یا بازطراحی سایت برنامه دارید، مسیر خدمات طراحی سایت نیاسا را با نیازهای عملکردی پروژه خود بررسی کنید.
Frequently asked
5Why do users still feel the site is slow when the PageSpeed score is good?
A lab score reflects the conditions of that one test, not every device or user journey. The problem may appear when someone opens the menu, searches or pays. Check those interactions on your own audience's phones and networks.
For users in Iran, is domestic hosting or a CDN better?
They don't replace each other. Hosting runs your application, and a content delivery network can speed up how resources reach users. Decide by testing on several networks inside Iran, based on your content type and where the delay actually occurs.
Do we need to change hosts to improve website speed?
Only when the evidence shows hosting limits are a major part of the slowness. If the page responds quickly but the browser is stuck running heavy code, a new host won't fix the real problem.
Does a speed score of 100 lead to better Google rankings?
A perfect score doesn't guarantee rankings, and it can't stand in for quality content that meets search intent. A more useful goal is an acceptable experience for real users and healthy key journeys on your site.
Why does the speed test result change every time I run it?
Server load, cache state, network conditions and third-party response times are never constant. Run several tests with identical settings and compare the typical result with your previous runs, not the best score.






