0

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

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

1 Answers1

0

If i understood issue correctly, Its already answered Here : Detect that the Internet connection is offline?

We can mark this duplicate for same Question.