The (now defunct) page http://stream.twitter.com/1/statuses/sample.json used to return a continuous and endless stream of JSON data.
I\'d like to process it using jQ
A web page at a very fundamental level can't keep a live/running connection to a server. Web browser sends a request to the server. Server sends a response (the HTML and more) back to the client (web browser). Think of this as a stateless model - no connection is ever kept alive after the request and response have been completed.
Therefore, you have to do it yourself. You have to invoke additional, periodic requests from the client-side.
One way would be to periodically call your AJAX/GET functionality via setInterval() function. For example:
setInterval(function() {
$.ajax({
url: "mydata/get",
success: function(){
// update content.
}
});
}, 5000);
This will fire off an AJAX request to mydata/get (or whatever URL you want to use) every 5 seconds.