javascript - Dealing with clients behind slow connection -
I am working on the creation of an AJAX based messaging system. The idea is that the client has to call the server to get the latest message for seconds of every x number and some other important information. It relies heavily on the data to be distributed to the client. I have tested it on all types of connections and everything is working perfectly. While running a demo test, we noticed that some clients were showing "undefined" text in those places where information was to be displayed to the server. That kind of tells me that the server response is slashed or something like that was the reason for thwarting the Java script.
It seems that it is common for only those customers who have reported this problem that they are behind slow connections. And about 20 of the dozen of browsers were open on different machines and all used the same switch.
The bottom line is that it is having problems with customers with very slow connectivity. I have set a deadline for AJAX calls on which periodicity has been requested. For calling now, this time out and timer is 5 seconds. The response payload is only 150-160 bytes.
Assuming that this is a problem with a slow connection and timeout, what would be the best practice and strategy to deal with this situation?
Thanks
That timeout seems too short for that scenario Increase for 10-15 seconds and do not send another request if it has not returned yet. Content size may actually be small, but it is a latency issue.
Comments
Post a Comment