I want the action to be automatically reflected for all the logged in users.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You may want to use
XMLHttpRequestto poll the server every few seconds or so. Then the server can respond with instructions to the browsers of all users visiting your site (or a selected few) in near real-time.You may also want to consider long polling instead of the above, to reduce the latency without increasing the frequency of the polls.
Quoting Comet Daily: The Long-Polling Technique:
In addition to the above, I also suggest that you check out the accepted answer to the following Stack Overflow post for a detailed description of the long polling technique: