I meet a trouble, that is I can't request 2 ajax at the same time with framework (Symfony)
Here is my code:
JQuery:
function doAjax1()
{
$.ajax({
url: "server1.php",
type: "POST",
data: {
id: 1,
},
success: function(){
},
});
}
function doAjax()
{
$.ajax({
url: "server.php",
type: "POST",
data: {
id: 1,
},
success: function(){
},
});
}
PHP Server:
sleep(10);
echo "Done 10s";
PHP Server1:
sleep(1);
echo "Done 1s";
First, I call doAjax() and second, doAjax1().
Without any framework, doAjax1() take about 1s, and doAjax() take about 10s, exactly what I want.
But with symfony 1.4 framework, doAjax1() take about 11s, and doAjax() take about 10s, it's seem doAjax() completed, doAjax1() call later.
Is there any safe solution for me?
Thank you.
doAjax()anddoAjax1()?