2 Request Issue
Mozilla FireFox has this weird problem that when three AJAX requests are sent, the browser helds up until their response is not returned. For this reason coding a chat application is really hard because in several case this kind of scenerio is achieved. Is there anyway round it?
I have designed a little AJAX library that automatically queues new requests if there's still a request active.
I recommend to do the same, also because multiple AJAX requests at the same time can screw with your server-side sessions (if you use any).
the suggestion is useful yet this may not work in case of a chat application. The reason is simply that the amount of people you can chat with in one time is not fixed. Hence if a person has opened up several chat windows with several friends then this becomes messy.