Re: PHP "Smart Refresh" for looping server lookups

From: Date: Mon, 22 Sep 2003 10:34:06 +0000
Subject: Re: PHP "Smart Refresh" for looping server lookups
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-163447@lists.php.net to get a copy of this message
You can use a hidden iframe that would regularly refresh and if new messages are waiting send some javascript. In this javascript use DOM functions to insert the new message into the page. NukedWeb@aol.com wrote:
This may sound a bit long and drawn out, but I'll try my best to summarize what I'm having trouble with. Roughly 2 weeks ago I began writing scripts to run a free TagBoard service. (Examples: Tag-Board.com and [mine] MyTagBoard.com) - my 2-week-long goal was to compile a list of features (based on 3 or 4 tagboard sites) and add those to this set of scripts. I was successful in pretty much all the features and more, except for one: "Smart Refresh". The tagboards currently refresh at a rate of xx seconds, set by the tagboard owner. Other sites have managed to design the tagboard to refresh ONLY when a new tag exists on the server, simulating a "live chat". My question is, how is this "Smart Refresh" done? How does a page that's loaded, just "sit there" and still be able to take a peek at the server without just refreshing the whole page? It's mind-boggling, even for me. :-D I'm not looking for actual code; that part I can do; I'm just looking for a basic "what does what" procedure on how it's done. Any thoughts on this would be very greatful! Thanks in advance =) ~ Tim


« previous php.general (#163447) next »