Welcome to WebmasterWorld Guest from

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)

10+ Year Member

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!


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

WebmasterWorld Senior Member 10+ Year Member

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)

10+ Year Member

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)

10+ Year Member

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

Featured Threads

Hot Threads This Week

Hot Threads This Month