how to judge client's network off-line or online use JavaScript? -


this question has answer here:

if(window.navigator.online==true){      alert("connect success")   }else{      alert("fail")  }

window.navigator.online return true whatever in off-line or online.any other methods solve problem? thanks.

if understood issue correctly, answered here : detect internet connection offline?

we can mark duplicate same question.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -