Checking if the Internet and a particular site are up in JavaScript/AJAX

前端 未结 3 1093
礼貌的吻别
礼貌的吻别 2021-01-24 17:09

I have a page which runs locally on my device, and I would like to use AJAX or normal JavaScript to check if the device is connected to the Internet and if a pa

3条回答
  •  无人及你
    2021-01-24 17:52

    Cross site Ajax is forbidden due to security concerns. A few work arounds would be to either use greasemonkey/userscripts(if this is just for personal use), or a plugin such as flash or java

提交回复
热议问题