implemented thorough, robust JS-based bandwidth measurement