Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
194
rated 0 times [  199] [ 5]  / answers: 1 / hits: 40729  / 11 Years ago, mon, june 10, 2013, 12:00:00

I'm implementing a browser extension which should connect to the nearest server to test the ping speed.


To have more details, kindly have a look on SpeedTest, it first calculates the ping time.
And to calculate this ping time, it detects the nearest servers and then pings it.


For example, here's the nearest servers detected by SpeedTest. I marked them in red arrows



SpeedTest




How does SpeedTest detect these servers ?


i.e. How can I detect the nearest servers and their locations in javascript as SpeedTest does ?


More From » ping

 Answers
15

What speedtest is doing is not a real ping in the sense of having the client machine run a ping operation. I have no knowledge of their exact methods (and I believe they use flash rather than pure JS, or at least used to), but I would guess that they try to access a small resource (an empty text/image file?) on each of these machines, and then time the response back. That is certainly one way to implement this anyway.


[#77712] Saturday, June 8, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ulysses

Total Points: 111
Total Questions: 118
Total Answers: 113

Location: Zambia
Member since Sat, Oct 31, 2020
4 Years ago
;