I have a chat page where multiple $.post() are performed at once. The server throws ERR_EMPTY_RESPONSE when multiple $.post() are performed at once.
To minimize, I have created a test page. An ERR_EMPTY_RESPONSE occurs when input is given continuously for some seconds.
The page contents:
a.php
<script>
$(document).ready(function(e) { $(".abc").keyup(function(){
var a = $(this).val();
$(".showoff").text("wait..");
$.post('bbs.php',{a:a},function(abc){
$(".showoff").html(abc);
}); });});
</script>
<input type="textbox" class="abc"> <div class="showoff">Type to Change Me!</div>
bbs.php
<?php
echo $_POST['a'];
?>
I think this problem might be because multiple request are made before the previous one is responded.
So, how to not allow next post, till previous is resolved? Or, What could be the problem behind this?
Thanks in Advance.