How to send messages from server to client?

前端 未结 6 1062
轮回少年
轮回少年 2021-02-08 13:12

I am going to implement something similar to Facebook notification and this website (StackOverflow\'s notification which is notifying us if anyone write a comment/answer etc for

6条回答
  •  天命终不由人
    2021-02-08 13:53

    Check for update from server on every 30 Seconds or as per requirement.

    window.setInterval(function(){
      /// call your function here
     //Make AJAX call
     //Update Respective HTML Contact i,e, DIV
    
    }, 30000);
    

提交回复
热议问题