jQuery Ajax fails on Android tablet browser

I am developing on a Samsung tablet which has default browser.

The ISS tells me this info : Mozilla/5.0+(Linux;+U;+Android+3.2;+en-us;+GT-P7500+Build/HTJ85B)

The ajax call keeps failing with Error 0 and no information when posting info to server. On every other browser it works without problems.

Any idea why ?

here is the code i use : status is 0 end textStatus is undefined

$.ajax({
            url: uri,
            contentType: "application/json;charset=utf-8",
            dataType: "text",
            data: input,
            type: 'POST',
            error: function (jqXHR, textStatus, errorThrown) {
                doShowError("Error:" + jqXHR.status + "--" + textStatus + "--" + errorThrown + "-"+ jqXHR.readyState); 
            }
            }

Edit 1 : Mozilla/5.0+(Linux;+U;+Android+3.2;+en-us;+GT-P7500+Build/HTJ85B)+AppleWebKit/534.13+(KHTML,+like+Gecko)+Version/4.0+Safari/534.13 this is all I get.

Answers:

Answer

Found a solution :

It seems that when doing things asynchronously in this Webkit browser, when receiving multiple chunks of data from a large response, the browser responds with status 0 which means error, instead of 206 which means partial result. The advice for my case is that we should used sync in order to fix the issue until this bug is fixed : http://code.google.com/p/android/issues/detail?id=14924 or this one http://bugs.jquery.com/ticket/8343

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.