I need to update my UI (webpage) periodically with new values. I have PHP code that grabs the values form a database, but I am not 100% sure on what is the best way of getting that data to the UI side.
The complication here is that:
1. I need to constantly update the values (every second)
2. I need to update many different areas of the page independently
Thanks,
What you probably want is comet, not setInterval as you’ll overwhelm your servers with a lot of unnecessary traffic.
This is what Facebook does for their chat features, and their live feeds (or at least used to do, I haven’t looked at it in quite some time.