Hi, I don't think so. Because the web is based on a client/server disconnected architecture, after sending content, the server forgot the client. The client must send request to know if there are updates.
To do this in a more efficient way, you must reduce the process time on server. For example, you can store a value on text-plain file to indicate if an update is necessary. In this way, your database wouldn't blow up if your are 20 peoples on your chat room Pierre 2009/6/11 ch2450 <clemhuygheba...@gmail.com> > > Hi all, > > I'm trying to implement a simple chatting website. > For now what the code does is checking every 10 seconds if there are > new posts stored in the database (newer than the last check, 10 > seconds ago). > Is there a more efficient way than doing this with a timer??? for > example, is there some kind of event listener attached to the server > that would notify the client whenever the db is updated? > Thanks for your help, > Clem. >