I'm interested in handling streaming updates from a server. For things
like upload progress bars, this makes a lot of sense as opposed to
polling the server for updates every second. This can be done with a
hidden iframe and <script> tags but I wanted to attempt to do it with
XMLHttpRequest.

http://s3.amazonaws.com/four.livejournal/ajax_pull-0.1.zip

The problem with this is that Safari (and IE?) don't follow the
XMLHttpRequest  specification. They should keep transport.responseText
filled with the partially retrieved body but don't. Thus for the
present Ajax.Pull is only a theoretical option.

It works by making a XMLHttpRequest call to a server which streams a
list of JSON objects separated by semi-colons. You give the library a
handler function and this function gets called with each new JSON
object that comes from the server.

The file test_mongrel.rb is such a servlet which streams JSON for
testing purposes. Run it and go to http://localhost:4711/files/test.html.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to