Using jQuery.get() to measure client bandwidth
<p>I am using the following script do determine the downlink bandwidth of a user to serve content accordingly:</p>

<pre><code>    var bandwidthCheckStart = new Date().getTime();
    var bandwidthCheckEnd;
    $.ajax({
        url: xBandwidthCheckFile,
        async: false,
        cache: false,
        success: function(clipXmlRequest){
            bandwidthCheckEnd = new Date().getTime();
        },
        error: function() {
            xSendDebugMessage("Could not get \""+xBandwidthCheckFile+"\" from server.", "warning");
        }
    });
    var bandwidthCheckDuration = bandwidthCheckEnd - bandwidthCheckStart;
</code></pre>

<p>However, I feel like this method is not reliable, since it doesnt consider the time needed to initiate the file transfer. (We could probably minimize the effects by using a larger file to check the bandwidth but I want it to be 10kb max.)</p>

<p>Is there any way to determine the time the request starts to be answered or do you have another more reliable way in mind?</p>
