Answer the question
In order to leave comments, you need to log in
How to make $.ajax requests work after internet connection is restored?
Hello.
There is this script:
function preload(){
$.ajax({
type: "GET",
url: "/script.php",
cache: false,
success: function(q){
//действия с ответом
alert(q);
}});
};
Answer the question
In order to leave comments, you need to log in
The solution turned out to be this:
after
success: function(q){
//actions with the response
alert(q);
}
add
,error : function (xhr, ajaxOptions, thrownError){ setTimeout(200,preload()) }
And everything works.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question