What Is Latency? Why Is Your Website Slow to Load?

Latency is the time it takes for data to travel from one point to another and back. We explain why your site loads slowly despite a fast connection and how you can shorten that time.
A bridge linking a laptop and a distant server on rocky platforms, with intermediate connection boxes and a small hourglass.

Need help with this?

Let’s plan your brand, web and software work with one team.

Start a Project

Latency is the time it takes for a request to travel from a visitor's device to the server and for the response to come back, measured in milliseconds (ms). What is latency, from a business point of view? However fast your visitor's internet connection is, every request has to travel a route, and the time that route takes shapes how quickly your site seems to "open." In this post we explain where latency comes from, how it differs from bandwidth and what you can improve on your site.

In short

  • Latency is the round-trip time of data; speed (bandwidth) is the amount of data that can be carried per unit of time. They are two different things.
  • Physical distance, intermediate devices, the DNS lookup, connection and encryption handshakes, and the time the server takes to prepare its response all add to latency.
  • A page is made up of dozens of requests; small delays on each one add up and make the page load slowly.
  • Choosing a server close to your visitors, using caching, and cutting redirects and unnecessary requests reduce the impact of latency.

What is latency?

According to MDN's definition, latency is the time it takes for a packet of data to get from its source to its destination. On the web it is usually measured as round-trip time (RTT): the browser sends a request, the server responds and the first part of that response reaches the browser.

When you run ping example.com on your computer, the "time=… ms" value you see is a simple measurement of this round-trip time. A low value means requests are going back and forth quickly.

Latency also has a "sibling" concept: jitter. Jitter is the variation in latency. If packets sometimes arrive in 20 ms and sometimes much later, the connection is irregular. On web pages the effect of jitter is limited; in video calls and live streams it is felt as stuttering.

Latency vs. bandwidth

These two concepts are often confused. A simple analogy:

  • Bandwidth is how many lanes the road has: it determines how much data can be carried at the same time (Mbps).
  • Latency is how long it takes a vehicle to get from point A to point B.

Widening the road to ten lanes does not shorten a car's journey from Istanbul to London. The internet works the same way. As Ilya Grigorik stresses in his book High Performance Browser Networking, for most websites the factor that limits performance is not bandwidth but latency. That's because a web page is not one large file but many small requests: HTML, CSS, JavaScript, fonts, images. The round-trip time is paid again on every request.

LatencyBandwidth
What does it measure?The time for data to go and come backThe amount of data that can be carried per unit of time
UnitMilliseconds (ms)Mbps, Gbps
What makes it go up or down?Distance, intermediate devices, server response timeLine capacity, plan, network congestion
Effect on the webThe page's "first response" time; many small requestsDownload time of large files (video, high-resolution images)
A wide teal channel full of cream data cubes next to a winding narrow coral path carrying a single cube, with a small hourglass in the middle.
Bandwidth is the width of the road; latency is the length of the journey.

Where does latency come from?

The time a request takes doesn't come from a single source; it is the sum of several parts.

1. Physical distance

In fiber-optic cables, data travels close to, but slower than, the speed of light: roughly 200,000 km per second. According to the calculations in High Performance Browser Networking, a round trip between New York and London takes about 56 ms even over an ideal fiber link. In real life, cables don't follow a straight line and packets pass through many intermediate devices, so the time is longer. That's why, if your visitors are in Turkey and your server is on another continent, every request gets a noticeable extra delay.

2. Intermediate devices and the "last mile"

Along the way, packets pass through routers. Each device processes the packet and, if necessary, holds it in a queue. The first stretch where a home or office connection joins the operator's network (the "last mile") can add tens of milliseconds on its own. On mobile connections this share is usually higher.

3. Connection setup steps

When connecting to a site for the first time, the browser does some preparation before it asks for any data:

  1. DNS lookup: It finds the IP address of the domain name (see What is DNS?).
  2. TCP connection: It "shakes hands" with the server.
  3. TLS handshake: It sets up the encrypted connection for HTTPS (see HTTP vs. HTTPS).

As MDN notes, latency is longer on the first request, because the DNS lookup, TCP handshake and TLS negotiation are included in that time. Requests after the connection is established come back faster. That's why it matters how many different domains your page pulls resources from (fonts, analytics tools, chat widgets, external scripts): every new domain means a separate DNS lookup and a separate connection.

TLS 1.3 was designed to shorten connection setup compared with the previous version. So whether your server supports the current TLS version is not only a security issue but also a speed issue.

4. Server response time

Once the request reaches the server, the server prepares the page: in a system like WordPress, PHP runs, the database is queried and HTML is generated. This time is not network latency, but for the user it feels like the same wait. A slow server can cancel out the advantage of a nearby data center.

5. Redirects

A chain that goes from http:// to https://, then to the www address, then to a language folder means a new round trip at every step. web.dev's TTFB guide lists redirects as one of the common causes of a longer time to first byte.

A scene on a long cream platform with an hourglass, an index card, connection rings, a lock and a server, showing the successive stages of latency.
The time of a single request is the sum of several steps.

How does latency affect your website and your business?

The most direct measure of latency is TTFB (Time to First Byte). TTFB covers redirects, the DNS lookup, connection and TLS setup, and the time until the server sends its first response. As a rough guide, web.dev says most sites should aim to keep their TTFB at 0.8 seconds or less.

TTFB on its own is not a Core Web Vitals metric. But it comes before LCP, the time it takes for a page's main content to appear: if the first byte arrives late, everything else starts late too. You can read our detailed post on Core Web Vitals here.

For a business the result is simple: the longer a visitor stares at a blank screen while the page loads, the more easily they leave your site. Customers who visit your site on a mobile connection, out in the field or on the move, feel latency even more.

How can you reduce latency?

You can't change distance or the speed of light, but you can reduce the impact of latency.

  • Choose your server location based on your visitors. If most of your customers are in Turkey, ask about the data center's location when choosing hosting or a server. We covered the types of hosting in our post What is web hosting?
  • Consider using a content delivery network (CDN). A CDN keeps copies of your site's static files on servers close to your visitors. If your visitors are spread across different countries, the effect is clear. web.dev notes that distant users can experience high TTFB and that, for sites not using a CDN, this is a priority improvement.
  • Use page caching. Having the server send a ready-made copy instead of regenerating the page on every visit shortens the wait on the server side.
  • Shorten redirect chains. Make your internal links point directly to the final address (e.g. https://www…).
  • Reduce external domains. Remove tracking codes, plugins and external fonts you don't use; serve the ones you need from your own server where possible.
  • Reduce the number of requests. Unnecessary scripts and large but unused files each mean a separate wait.

Common mistakes

  • Saying "Our internet plan is fast, the problem isn't on our side." A speed test measures bandwidth. If your site is on a server on another continent, a fast connection won't eliminate latency.
  • Testing only from your own computer. You may be seeing your site from cache, over the office's wired network. A visitor on a mobile network has a different experience.
  • Not noticing that caching hides a slow server. As web.dev warns, caching can mask a slow back end. Pages that aren't cached (the cart, pages shown after a form is submitted, logged-in users) can stay slow.
  • Adding every new plugin as "just a small snippet." Every external script can mean a new domain and a new connection.

Our experience

Our own site, artsution.com.tr, runs on a LiteSpeed server with the LiteSpeed Cache plugin. While improving our mobile PageSpeed results, we combined CSS files, served fonts locally instead of pulling them from an external service, and prepared small font subsets for Turkish characters. This reduced the number of external connections and requests the page needs.

We also learned a lesson: the "guest optimization" option in LiteSpeed Cache can delay JavaScript until the first interaction. That may look good in measurement tools, but it can stop menus and forms from working on the first tap. That's why we keep this option turned off. When you reduce latency, you shouldn't break the visitor's real experience.

Frequently asked questions

Are latency and ping the same thing?

In everyday use, they are often used to mean the same thing. The ping command measures the time it takes for a packet to reach the target and for the reply to come back, in other words the round-trip time (RTT). Latency is a broader concept; it can also be used to include waits outside the network, such as the time the server takes to prepare a response.

Will my site load faster if I increase my internet speed?

Large files will download faster, but the page's first response time often doesn't change much. That's because a web page is made up of many small requests and the round-trip time is paid on each one. At this point, what decides the outcome is latency, not bandwidth.

How can I measure my site's latency?

The "Network" tab in your browser's developer tools shows the DNS, connection, TLS and waiting times of each request separately. Tools such as PageSpeed Insights also report time to first byte (TTFB). Repeat the measurement from different networks and from a mobile device as well.

My server is abroad. Is that a problem?

If most of your visitors are in Turkey, every request gets an extra distance delay. Caching and a CDN can reduce this effect. Still, we recommend that you weigh the data center's location against where your visitors are when choosing a server.

Conclusion

Latency is often the answer to the question "why does my site load slowly despite a fast internet connection?" When you look at distance, connection steps and server response time together, the points to improve become clear: the right server location, caching, short redirect chains and few external resources.

If you'd like us to look into why your site is slow together, take a look at our web design and WordPress development services, or contact us.

Learn more on Grafik Sanat (in Turkish): Visual explanations and quizzes on this topic → grafiksanat.com.tr/terim/gecikme

Sources7
  1. MDN Web Docs, "Understanding latency" developer.mozilla.org
  2. MDN Web Docs, "Round Trip Time (RTT)" developer.mozilla.org
  3. MDN Web Docs, "Jitter" developer.mozilla.org
  4. Ilya Grigorik, *High Performance Browser Networking*, "Primer on Latency and Bandwidth" hpbn.co
  5. web.dev, "Time to First Byte (TTFB)" web.dev
  6. web.dev, "Optimize Time to First Byte" web.dev
  7. IETF, RFC 8446 — The Transport Layer Security (TLS) Protocol Version 1.3 rfc-editor.org
LinkedIn
WhatsApp
X
Facebook

Start a Project

Tell us about your project.

Fill in the form and we’ll get back to you within one business day with a roadmap tailored to you. You can also write to us directly at info@artsution.com.tr.