How to implement a chat room using Jquery/PHP?
I'm looking to implement a chat room using PHP/Javascript (Jquery) with both group chat and private chat features. The problem is how to continually update the interface in a natural way and possibly also how to show 'X is typing..' messages in private chat. The obvious way seems to be that every X seconds/milliseconds the javascript pings the server and fetches a list of new messages between the last ping and now. However, this can make the interface seem a bit unnatural, if suddenly the chat room is flooded with 5 messages. I would rather each message appear as it is typed. Is there a way