I have a web application that is running in an environment on mobile devices that looses internet connectivity frequently. I want to take different actions using javascript depending on whether the wireless network is down vs when the internet is down (such as what error to log).
I can make an ajax service call to my server and if I can reach it I know that both the wifi and internet are working, but if this call fails I am not certain how to distinguish if it is because of a network or internet issue.
Does anyone know how to check if a device is connected to a wifi network using javascript? I do not need the SSID or name of the network, just that it is actually connected to something.