When my application url load in browser, if internet is unavailable i need alert message or any error prompt show to user that 'Internet unavailable'.If internet is available it run the application. Please anyone help me to fix this issue
Asked
Active
Viewed 69 times
0
-
please check this https://stackoverflow.com/questions/2384167/check-if-internet-connection-exists-with-javascript – shv22 May 30 '17 at 10:47
-
Check this: https://stackoverflow.com/questions/20043215/check-internet-connectivity-with-jquery – Milan Chheda May 30 '17 at 10:47
1 Answers
1
I suggest you to write interceptor, and check it there
if (!window.navigator.onLine) {
// youre code
}

John Doe
- 547
- 3
- 11