https://www.robertkehoe.com/2013/01/fix-for-phonegap-connection-to-server-was-unsuccessful/