Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Don't know of any utility or standard API, no, but you can do this by having several images of various sizes on your website, and then retrieving them bypassing cache and watching how long it takes for them to load. That information, along with the size of the image, gives you an <em>indication</em> of the speed between the two endpoints.</p> <p>The reason for using multiple images is that you'll want to start small (say, 20k), but if the connection is fast that will give you a very inaccurate number; so based on how quickly that image loaded, you'll want to select another image of an appropriate size to try to get a better idea of the actual bandwidth (as opposed to the latency setting up the connection and such).</p> <p>You can do this just with straight JavaScript, by adding <code>img</code> tags off-page with a unique query string to bypass caching; but as you've tagged your question "jQuery", you may find it more convenient to use <a href="http://api.jquery.com/jQuery.ajax/" rel="noreferrer">the .ajax function</a> (with its <code>cache: false</code> setting) instead.</p> <p>The speed number you come up with is only an indication, since other things could be going on that mess up your timing (video streaming in another tab&nbsp;&mdash; or on another computer hooked to the same internet connection, even other things slowing up the execution of your JavaScript, like a JS-heavy animation on the page), but it should be good enough to give you an idea what you're working with.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload