Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Refreshing webpage when MySQL db has changed



3:24 pm on Dec 17, 2007 (gmt 0)

5+ Year Member

I am pretty sure there is not a way to directly do this but wanted to throw it out. Basically we have a log (that several users at a time could be looking at), when data is submitted it posts to the MySQL db. Instead of having the page auto-refresh every 2 minutes or so, it would be nice if it would just refresh when a change is detected. This would also cut down on the chances that data is missed due to inopportune refreshing/submitting. Read something about AJAX? Pretty much a novice so any help would be appreciated.



3:37 pm on Dec 17, 2007 (gmt 0)

WebmasterWorld Senior Member demaestro is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Ajax is the nicest route because no page refresh is called, the data just reloads from an http header request.

Look into it.

There are fully built libraries available.

I use this one with much success. They take care of all the browser compliance and code updates.

Yahoo (YUI)


5:37 pm on Dec 17, 2007 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

You'll still have to poll the server for changes, though. About all you could do is increase your polling rate.

Featured Threads

Hot Threads This Week

Hot Threads This Month