I’m on my phone and I can’t debug/look into it but the jitter is very high.
Over 5 tries I’ve received widely varying ping times to SF, two of which were 1s while NYC was 140 ms ish.
Just weird because I’m on a reliable connection in SF (sonic).
Over 5 tries I’ve received widely varying ping times to SF, two of which were 1s while NYC was 140 ms ish.
Just weird because I’m on a reliable connection in SF (sonic).
function ping_test() {
time_request("http://ping.projects.chrisjeakle.com/ping/data.txt", "result-east");
time_request("http://ping.projects-west.chrisjeakle.com/ping/data.txt", "result-west");
}
function time_request(url, output_id) {
document.getElementById(output_id).innerText = "...";
const start_time = new Date().getTime();
fetch(url, {
mode: "no-cors",
cache: "no-cache",
}).then(async (result) => {
const elapsed_time = new Date().getTime() - start_time;
document.getElementById(output_id).innerText = elapsed_time;
});
}Also, maybe you should run the tests in sequence instead of at the same time. I wonder if running two concurrent fetches might disadvantage the second fetch?