Welcome to WebmasterWorld Guest from 54.196.233.208

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

How would I do this with PHP?

auto refresh tagboard when a new message is posted.

     
3:37 pm on Oct 12, 2002 (gmt 0)

New User

10+ Year Member

joined:June 22, 2002
posts:14
votes: 0


Hi,
I've written quite a complex tagboard script that is looking very good except for one thing: I want it to auto-refresh when a new message is posted, like a chatroom. I have it refreshing after a certain number of seconds, but I'm really stuck with this one. Does anyone have any suggestions? thanks!
-erin
6:10 pm on Oct 12, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 4, 2001
posts:997
votes: 0


Meta refresh tags is the only way. HTML doesn't know what's happening on the server (ie: php). There is no such thing as persistant HTML connections in most web browsers. Well, there is server side push, but that is very resource intensive.
8:00 pm on Oct 12, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:July 16, 2001
posts:545
votes: 0


Two possibilities:

1) Use a javascript to request a last modified time, or something, from the server and have it do a hard refresh when it reads.

2) Use a zero height frame at the top or bottom, that does a refresh more often than your big window,(or let it be the only refresh). When it comes up with new info have it refresh the big window.

I've not tested either of these, or thought them much farther than what you see...

10:22 pm on Oct 12, 2002 (gmt 0)

New User

10+ Year Member

joined:June 22, 2002
posts:14
votes: 0


Slade, I really like your second idea. It never crossed my mind. I think I'll try it. Thanks!
-erin