I've noticed that you are sending the entire contents of the chat table with each ajax request. I think it would be better if you only sent some sort of javascript array (json) with the new entries, and an empty response if no new messages were sent.
It will save on javascript processing (possibly javascript memory leakage as well) and on bandwidth considering this auto refreshes every x seconds.
|