Ping is a measure of round-trip-time (RTT), or how long it takes for a message to go from your computer to the server and back. We call the delay the latency.
A fibre optic line between two offices has low latency, whilst mailing a hard drive has massive latency.
High latency will make it take longer for the initial request to hit the server and come back. The simplest of websites will require one RTT:
- Client asks for a page
- Server delivers the page
More complex pages also need additional requests. You'll only learn that you need to load stylesheets, javascript libraries, and so forth after loading the HTML for a page, so that adds additional round trips as well.
Even worse, these requests might be made in series. So you'll request foo.css
, then bar.js
, then baz.jpg
- and each request will take a RTT. This generally doesn't happen, but you will still have resources loading in chunks - resource A says it needs B, and B needs C, and C needs D...
An example
With Chrome's dev tools, you can emulate a connection with poor latency. Loading a few sites with varying ping settings reveals how much high latency hurts. I measured the time taken for the DOM to be loaded, meaning that the structure of the page is known, even though images, styles, etc. might still be loading.
Also, I measured these by hitting ctrl-F5, which ignores cached data. This makes loads slower, but also reflects what should happen when you visit a site for the first time.
stackoverflow.com gives:
No delay (40ms): 350ms
200ms latency: 700ms
400ms latency: 1130ms
It looks like we need a few RTT's to starting showing something. Not too bad. We can also examine the time taken for everything to load:
No delay (40ms): 750ms
200ms latency: 2000ms
400ms latency: 4000ms
That's a lot worse! Now, a lot of this is really just the ads loading, but it still goes to show how important RTT can be.
So, in short: yes, high latency can make webpages load slowly. More complex pages will load noticeably slower, even if their contents aren't very large, because every request has a large delay.
2what do you mean by slow web browsing? – Keltari – 2018-12-09T01:04:09.630
1At least a couple of people seem to think you are asking, "I do a lot of pinging. Does my pinging *interfere with* web browsing *and cause it to slow down?*" Other people believe that you are saying, "I have observed that, when I ping a website, the time is between 200ms to 400ms. *Is this a symptom of a problem that could also cause* slow web browsing?" Please [edit] your post to clarify what you are asking. – Scott – 2018-12-09T04:57:04.750