When I send two ajax requests together using jQuery .. the answer comes along
eg
$.ajax ({ type: "POST", url: 'ajax.php' }); $.ajax ({ type: "POST", url: 'ajax2.php' });
ajax.php, ajax2.php are two files containing a cycle dummy for a cycle of about 5 seconds.
FireBug Screen
POST localhost / ajax.php 200 OK 4.77s
POST localhost / ajax.php 200 OK 4.37s
Here, each request takes about 5 seconds to complete .....
When I do the same example in symfony, I got a different result
$.ajax ({ type: "POST", url: 'module/action1' }); $.ajax ({ type: "POST", url: 'module/action2' });
action1, action2 are two actions that simply contain fiction for the loop, take about 5 seconds.
FireBug Screen
POST localhost / web / frontend_dev.php / module / action1 200 OK 4.47s
POST localhost / web / frontend_dev.php / module / action2 200 OK 9.87s
Please note that the second request executed after the completion of the first, I do not know why this happened
source share