In AJAX applications that need to poll the server in regular intervals (like a chat applications), what is the recommended minimum time between two calls, so that the update is done as quickly as possible? What times are considered as hogs for the server and the client?
Share
It depends on the application, but for chat you probably want to poll pretty often – 1 to 4 seconds I’d say. What you can do is dynamically change the polling interval to decrease your server load – if nobody has said anything for a minute, increase to 10 seconds… after 5 minutes increase to 30 seconds – that kind of thing.