I''m modifying techno weenie''s progress bar plug-in. Currently it works by making the browser poll the server, via AJAX, for updates on amount received. My plug-in provides a handler which will stream updates on the amount received, thus only one request needs to be made. Also, the progress can be updated at faster rates since the client doesn''t need to poll. This should reduce loads on both server and client. It''s a work in progress but check it out: http://four.livejournal.com/747302.html ry
On Mon, 2 Apr 2007 12:34:06 +0200 "Ry Dahl" <ry at tinyclouds.org> wrote:> I''m modifying techno weenie''s progress bar plug-in. Currently it works > by making the browser poll the server, via AJAX, for updates on amount > received. My plug-in provides a handler which will stream updates on > the amount received, thus only one request needs to be made. Also, the > progress can be updated at faster rates since the client doesn''t need > to poll. This should reduce loads on both server and client.Hey Ry, are there any updates on this? There''s a lighttpd plugin as well that Jan (lighttpd author) is working on. He''s talking about standardizing. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/
I''ve just seen this too and I think it''s a better way to go: sending JSON instead updates instead of js function calls. Note, it appears that the lighty plug-in does not stream this response: you are still required to poll the server for each update. Status: I''ve been idly toying with the idea of prototype.js executing a streamed response from an XMLHttpRequest call (to avoid the use of iframes; but I can''t seem to get it to work with Safari YET) I plan on changing both my mongrel plug-in and prototype code to send/receive JSON instead of javascript functions now. ry