Is it possible to ping a server from Javascript?

后端 未结 17 1212
礼貌的吻别
礼貌的吻别 2020-11-22 04:02

I\'m making a web app that requires that I check to see if remote servers are online or not. When I run it from the command line, my page load goes up to a full 60s (for 8 e

17条回答
  •  日久生厌
    2020-11-22 04:46

    You can't directly "ping" in javascript. There may be a few other ways:

    • Ajax
    • Using a java applet with isReachable
    • Writing a serverside script which pings and using AJAX to communicate to your serversidescript
    • You might also be able to ping in flash (actionscript)

提交回复
热议问题