jQuery / AJAX问题

时间:2016-02-07 18:13:38

标签: jquery web webserver hosting

在多次调用AJAX函数之后,我注意到有很多进程被激活并且我的网站被阻止了(在localhost中没有问题,它运行良好)。

jquery调用与阻止它的主机的进程或安全性之间的关系是什么? (我在聊天,upvote和downvote函数中有这个问题)。

1 个答案:

答案 0 :(得分:0)

     var auto_refresh3 = setInterval( function () { 
            //tchata2.php is a file checking the new messages  
             $.post("tchata2.php",{FID:identif},function (data){
                          if($('#newmsg').val()!=data){ 
                                $('#newmsg').empty(); 
                                $("#newmsg").append(data);
                          } 
             });
      }, 1000); // checking for other messages after 1 second