I know the online status could be checked using the javascript API navigator.onLine.
However, for smartphone html5 apps it would be also interesting HOW the online has been set. Either by WLAN or using 3G/4G connection.
Is there a way to detect the kind of online connection?