Friday, 15 March 2013

javascript - How often should a web chat client check for updates? -


I am creating a web based chat facility for any such application that includes Facebook chat or Google Talk within Gmail Will work as well. I am thinking that someone has any advice on how often should they check for updates? Every 2 seconds? Every 5 seconds? 10 seconds?

Also, do I want to call setTimeout in the callback function of setTimeout, or in the callback of the AJAX request for updates? Basically, should this call be between second or second seconds to complete the final request and the beginning of next?

Thank you

You can sometimes ping the server (server) You can use (ARA reverse AJAX) for a permanent connection.

Otherwise, I should have a good range of 2-3 seconds. Nothing less will be put inappropriate pressure on the server, and nothing will make the apple feel longer.


No comments:

Post a Comment