How to determine latency of a remote server through the browser

后端 未结 9 759
暖寄归人
暖寄归人 2020-12-17 15:41

I run a couple of game tunnelling servers and would like to have a page where the client can run a ping on all the servers and find out which is the most responsive. As far

9条回答
  •  春和景丽
    2020-12-17 16:24

    If you are talking about running something client side, I am not sure this is possible due to security reasons.

    Maybe your best bet would be a java applet - but again this needs to be checked against local security policy.

    If I try to think about some hack in JS to do this, maybe you can try to send an async request with a callback function which measures the milliseconds it took - but this is just off the top of my head.

提交回复
热议问题