I have a really weird behaviour on android app (Cordova 2.1).

I simple use code like that:

$.ajax({
        type: "GET",
        url: this.serverUrl,
        data:data,
        dataType: "json",
        timeout: 3000, // in milliseconds
        success: function(data) {
            //never gets here...
        },
        error: function(request, status, err) {
            //always gets here
            console.log(request.responseText);
        }
    });

request.responseText always contains html-page with this content: http://dimalezhnev.ru/assets/tmp/html.txt (I placed the output in this file).

I draw a picture in my mind that browser while doing ajax request drop it and returns response with that html - forces user to update the browser in agressive style.

How to prevent it? I just can't imagine why is this happening now.

0

There are 0 best solutions below