Reputation: 1023
How do I implement a real time updating /live html streaming method in applications like FriendFeed, Stackoverflow, Blip.fm ?
Is it done using a jQuery/Ajax request from client to server every X seconds? (FriendFeed is like every 1 second) or there is another technique?
Upvotes: 2
Views: 584
Reputation: 5348
There are a lot of techniques and ideas that started to came up with the need of a more interactive web.. You can find some reference here at stackoverflow
You can research about Comet, Polling and javascript, etc.
What SO does is to check the activity by using an ajax POST request to https://stackoverflow.com/posts/2977129/answer-activity-heartbeat for example in this question page. The request returns whether there was some activity happened or not, and an action is taken accordingly.
Upvotes: 1
Reputation: 13730
Yes the most common method is to use ajax with a client and server framework (such as jQuery and ASP.NET, jQuery and PHP, Prototype and X, etc.)
Since the web is 'stateless' you have to have some sort of clientside 'polling' mechanism that will periodically talk to the server and update the UI.
Upvotes: 1