javascript - to distinguish between device and server internet connectivity -


i trying hit sharepoint server phone(ios) having wifi feature. basically, making ajax call sharepoint server , using response further tasks. when device has wifi off, http response status '0' , when device has wifi 'on', sharepoint server not connectible, status comes '0'. how can differentiate between 2 scenarios , handle both scenarios differently. appreciated.

use reachability

arc version: https://github.com/tonymillion/reachability


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -