Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View /

Well I went 1 step further and added an AJAX routine

so the update is smooth as can be!

It polls for anything someone else said every 4 seconds which
shouldn't tax the server too much, it was refreshing the entire page
every 8 seconds which worked ok.

Same method as in FACEBOOK Chat and GOOGLE keyword suggestion.

Will do some tests and then make the script public, only 5KB, one HTML
file and one PHP file, might try making a PHP CLASS so you can easily
embed the chat window into a page with 1 line!

Need a simple chat script in your site?  this is a very small but a
smooth update PHP chat script!


Re: V1.ZZZ

On 10/9/2012 11:01 PM, Graham Cooper wrote:
Quoted text here. Click to load it

No, not a big load if you have one or two people chatting. But get a
couple of hundred, and it's a different story.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: V1.ZZZ

Quoted text here. Click to load it

Ah ok,  that would include lurkers too, each sending a request every 4

It sends about 100 bytes, the last 6 comments every 4 seconds.


load HTML
update chat screen every 4 secs

client says nothing for 1 minute
update chat screen every 8 secs

client says nothing for another minute
update chat screen every 16 secs


then, if it gets 10 requests in 1 second, everyone's refresh rate

degrades gracefully, people move on..


Re: V1.ZZZ

Quoted text here. Click to load it

This works on Chrome and IE9

Apparently IE8 and IE10 the text just flashes up...

might be INNERHTML or the AJAX routine..

any clues without me downloading IE10??


Site Timeline