Ajax response time

1

Personally I'm doing my first AJAX and am having a problem which is as follows. It calls a PHP routine that downloads and uploads one or more files via FTP. And this can take a while. How do I get AJAX to wait for it to finish before the answer.

Pastbin with the code

    
asked by anonymous 24.03.2015 / 15:04

1 answer

1

In this case you can use the parameter timeout to put a timeout greater than the default that I believe to be 30 seconds.

$.ajax({
  url: '/...',
  timeout: 600000,
  success: ...
});
    
28.03.2015 / 20:44