Ajax issue with phonegap.

I have a simple app, that does a AJAX request to retrieve data from a web site, in the browser it works fine, when build with phonegap, it work on a new phone running android 5.0, but on a older phone using 4.4, I'm getting a error from the call with a status of 0. Below is the code I'm using for the call. Is there something I'm missing, or do I need to set something in phonegap to make it work on older versions of android.

var request = new enyo.Ajax({url: url, dataType: 'json', method: 'GET'}) .response(this, "getResponse") .error(this, "ajaxError") .go(params)

Comments

  • I remember reading somewhere that older versions of Android return a status of 0 when requests are resolved by loading from the cache; is it possible this is happening in your case?
  • Might be, from looking at the server side, it does not seem to be hitting the server, so it may already of cached the results.

    But also it is calling the error method, implying there was an error.
Sign In or Register to comment.