XMLHttpRequest Problem

I am writing a single web application using XUL. In this Iam using the AJAX XMLHttpRequest object to send a request to the server. When I use a GPRS connection to send a request to the server from my web application, the request is not executed, but readyState has changed to 4 and status = 0. If the request does not exit, how does the ReadyState parameter change.

The same code works fine on the local network. If I send a request to the server from the browser using GPRS, it works fine. Can any body help me in solving this problem.

Thanks at Advance.

+1
source share
1 answer

request not coming

How do you define this?

Are you using an HTTP scheme? If so, the status == 0 is a problem ( Google says there are known quirks in Firefox).

status == 0 is also returned when the request uses a protocol other than HTTP. Therefore, if you make a file: // request randomly, this explains all the symptoms ...

[edit 2009-09-07] This problem was also found: https://bugzilla.mozilla.org/show_bug.cgi?id=488605 aborted XMLHttpRequests has the status == 0, since Firefox 3.

[edit] I'm not sure / sure, but I think that cross-domain requests that are not allowed also end with status == 0.

+1
source

Source: https://habr.com/ru/post/1500179/


All Articles