How to check whether a port is open at client's network/firewall?

前端 未结 8 1419
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-30 13:13

This is solved at last with \"timeout\" attribute of jQuery AJAX (and JSONP). See my own answer !

Please see the updated part, I

8条回答
  •  独厮守ぢ
    2020-11-30 13:45

    I don't think you understand the use cases for JSONP and it's not possible to test open ports with it. http://en.wikipedia.org/wiki/JSONP

    If you want a client side solution it could be possible with websockets, but this is only available on new browsers like chrome or ff. Otherwise request a server side script which does the ping. For example - with a curl script: curl and ping - how to check whether a website is either up or down?

提交回复
热议问题