readyState: 0, status: 0, statusText: error, responseText: POPULATED?

3,696 views
Skip to first unread message

Mark Andrachek, Jr.

unread,
May 29, 2012, 10:14:43 AM5/29/12
to phon...@googlegroups.com
I'm using cordova 1.7, with an app running on Android (currently using the emulator on 2.3.3).

I'm using jquerymobile, and thus jquery. I have jquerymobile set to allowCrossDomain pages, and I have $.support.cors = true;. Most of my ajax requests work just fine. 

On just a few however, I get a readyState 0, status 0, statusText error, and the responseText containing the expected json data. These few requests have something in common. They return a 206 Partial Content HTTP response, instead of a 200 OK. These couple of items do paging, and are using the Content-Range and Range headers.

I've tried using the statusCode functions in the jquery ajax call, but the 206 function is never called.

These same requests work just fine when using the desktop, or even the android web browser on the emulator (using relative url's on the server).

If it was a cross-domain issue, I'd really expect my other ajax requests that are similar to have the same issue??

Any help or ideas would be greatly appreciated.


Mark Andrachek, Jr.

unread,
May 30, 2012, 3:33:26 PM5/30/12
to phon...@googlegroups.com

It appears this is an android specific issue on pre-honeycomb devices. Apparently 206 Partial Content is not supported. I had to move my paging to using url parameters rather than HTTP headers to get it to work on 2.3.4 and earlier.

Thanks!

Kerri Shotts

unread,
May 31, 2012, 1:32:38 AM5/31/12
to phon...@googlegroups.com
Lovely. Thanks for the heads up.

Valentin Zaracho

unread,
Mar 17, 2014, 1:15:13 PM3/17/14
to phon...@googlegroups.com
Kerri good as you solved the problem? I do not understand .. I have the same problem!!! :(
Reply all
Reply to author
Forward
0 new messages