I want to create a script using javascript or query to check is internet connection still active on every 1 second ?
So was wrote some codes using PING.JS but I have a problem. My script sends 1 PING request on every 1 second and the server will response within 1 second, but My problem is I want to code if for any reason server's reply will not receive within 60 seconds then it will show me an alert. Also, I want to store data on variable how many PING request was received server's reply successfully? I am providing my script link. Please check and tell me where I was wrong.