jdfreder/pingjs

Always Succeeds

MitchBWeb opened this issue · 3 comments

When the String URL parameter is given a value of something that truly does not exist, it still succeeds and does not hit the .catch function.

Same here - pings not reachable, not existing or incorrect addresses / IP's.

Chuck Callebs provide an answer here: http://stackoverflow.com/questions/4282151/is-it-possible-to-ping-a-server-from-javascript.

Update 4: It looks as if this implementation is no longer reliable. People are also reporting that Chrome no longer supports it all, throwing a net::ERR_NAME_NOT_RESOLVED error. If someone can verify an alternate solution I will put that as the accepted answer.

I wonder if it would be possible to fallback to the fetch API to accomplish this...