chibineku Posted October 19, 2009 Share Posted October 19, 2009 I made a very simple AJAX chat app, just for fun, and it relies on recursive setTimeouts to call the reload function. Obviously this is inefficient and is liable to have my hosting company ban me, so I was wondering if there is a more efficient way of detecting new messages and pushing them without having to just keep checking and make ajax calls or otherwise checking the database? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 19, 2009 Share Posted October 19, 2009 You have to keep checking, HTTP doesn't have a way for the server to send a message to the browser without the browser having asked for it. Link to comment Share on other sites More sharing options...
chibineku Posted October 19, 2009 Author Share Posted October 19, 2009 Ah. Okie dokies. I thought as much but thought it was worth checking. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.