Data refresh

For news feed, what is the best way to refresh the data? setInterval or is there any better way of doing it, realtime updates would do for newsfeed? I want to know how you guys have done it.

Thanks