The "streaming" mode described above does not work with IE. MSIE flags correctly readystate ==3 when partial data arrives, but it does not allow to access the response text (like e.g. in firefox).
so i have defined yet another delivery interface for streaming data via ajax that seems to be quite robust: instead of sending JSON encoded java script objects, it uses now a hidden iframe that recieves a text/html file in streaming mode, which includes SCRIPT-tags containing the javascript calls. i called this mode "scripted-streaming". scripted-streaming works with Firefox, Safrari and IE.
The biggest disadvantage of scripted-streaming over streaming is that while the iframe loads (always) the activity indicator spins, which makes me nervous. so, when libthread is available, firefox uses "streaming" mode, the other browsers use "scripted-streaming" mode. When no libthread is available, "polling" mode is used for all browsers. One can certainly force the mode by specifying it as shown above.
xowiki chat is at least a study how to use AJAX with oacs in three different ways.