I have a simple web app which lists a private group of people and the last message they posted.
I'm currently just polling by using Ajax to hit a php script every 30 seconds, which gets all people and latest messages then returns as JSON. I parse that and update the DOM.
Not very efficient since most of the time, nothing has changed but it still gets all data each 30 seconds.
Is there anything basic I can do, just with the code to improve this?
Should I use something like pusher.com?
There are a lot of tutorials out there on implementing long polling but I'd like to keep this simple as possible.