I have 2 ajax requests on one page. I fulfilled the first request and separately started the second. But the second one stops working after the first launch. And continue when it's over. The first request will take a long time - about 30-60 seconds, and at this time I need a second request to show the logs of what happens to the first request. I am trying to use async: true, but that does not help me.
Here it is my code
<script type="text/javascript"> var auto_refresh = setInterval( function() { asyncGet('log.php') }, 1000 ); function asyncGet(addr) { $.ajax({ url: addr, async: true, success: function (response) { $('#loadLog').html(response); } }); } function getConn(addr) { $.ajax({ url: addr, async: true, success: function (response) { stopGet(); } }); } </script> <div id="loadLog" class="lLog"></div>
and I call the first ajax request this way: getConn ('main.php'); from the function when the button is pressed. The second request, which it launches, but does not show a response until the completion of the first request.
I will connect the image from firebug. main.php - a request that requires a longer time. log.php is a blocked logger.

It would be very helpful to understand where I'm wrong
source share