Giter Club home page Giter Club logo

Comments (8)

adolfintel avatar adolfintel commented on August 27, 2024 1

Yes, that's probably a good idea.
I'll add that in the next version

from speedtest.

adolfintel avatar adolfintel commented on August 27, 2024 1

I'm sure I had that in the old version of the documentation.
Anyways, expect an update in the next few hours.

from speedtest.

adolfintel avatar adolfintel commented on August 27, 2024

Try asking him how he solved it. My guess is that it was incorrect server config.

from speedtest.

adolfintel avatar adolfintel commented on August 27, 2024

...or you can just remove the /2 at line 325 in worker.js

from speedtest.

n-st avatar n-st commented on August 27, 2024

@adolfintel Why do you divide the time by 2 anyway?

from speedtest.

adolfintel avatar adolfintel commented on August 27, 2024

Because of how HTTP works. When you make a XHR request, here's what typically happens:

  • TCP connection is created (1 RTT)
  • HTTP request is sent (0.5 RTT)
  • HTTP response is received (0.5 RTT)

In total, that's 2 RTT, hence the /2.
The problem is if you're using a persistent HTTP connection because only the first request takes 2 RTT, then the next ones take only 1 RTT. This typically doesn't happen for XHR though.

from speedtest.

n-st avatar n-st commented on August 27, 2024

A good idea in theory, but not when your server sends a Connection: keep-alive header:
2017-06-14_12-17-01

I'd suggest making keep-alive mandatory for the server setup and then just discarding the first ping result (the one that establishes the connection).

from speedtest.

n-st avatar n-st commented on August 27, 2024

You might also want to mention the limitations of the ping test more clearly: I came here after a hosting provider got called out for false advertising on a forum because the ping results from his speedtest page were half of what you would get from normal ping commands.

Disclaimer: I'm not that provider, just a curious bystander. ;)

from speedtest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.