You're right, apparently Firefox waits that the page is big enough to start displaying it (I dunno why).
yield "<html><body>" + " " * 1024 tricks FF (2.0.0.14) Maybe Konqueror has the same behaviour and waits that the message is big enough before parsing it. Cheers, -- Yoan On Wed, May 28, 2008 at 12:51 AM, Justin Davis <[EMAIL PROTECTED]> wrote: > > This probably isn't a webpy thing, but when I run a similar example > (except just print text... yield str(i)+'<br/>') nothing shows up in > FF for about 120 seconds, and then they all appear up to that point, > and continue to appear every second. In konqueror, OTOH, they appear > almost immediately but come in pairs of 2. Anyone experience this > before? Is it a browser thing, and is there a way to get around it? > > Cheers, > Justin > > On May 27, 4:03 am, "Yoan Blanc" <[EMAIL PROTECTED]> wrote: >> ZOMG, that's me! >> >> to fix it. >> >> class js(object): >> def GET(self, name): >> yield "<html><body>" >> for i in xrange(1000): >> time.sleep(1) >> load = getloadavg() >> yield render.js(*load) >> yield "</html></body>" >> >> remove "web.flush()" >> and replace "print" by "yield" >> >> iframe is interesting when you need to update very frequently a page >> (like the Y! stock charts page). I.e. Bayeux put it as a fallback and >> I agree with it. >> >> "long-polling >> callback-polling >> iframe >> flash" >> --http://svn.cometd.com/trunk/bayeux/bayeux.html#toc_30 >> >> long-polling (http://yoan.dosimple.ch/blog/2008/02/28/) is much more >> interesting, and callback-polling (<script /> instead of XHR) enables >> cross-domain calls has well. >> >> Cheers, >> >> -- Yoan >> >> On Tue, May 27, 2008 at 7:22 AM, paul jobs <[EMAIL PROTECTED]> wrote: >> >http://yoan.dosimple.ch/blog/2007/11/30/ >> >> > class js(object): >> > def GET(self, name): >> > web.header('Content-type', 'text/html') >> > yield web.flush() >> > print "<html><body>" >> > for i in xrange(1000): >> > time.sleep(1) >> > load = getloadavg() >> > print render.js(*load) >> > print "</html></body>" >> >> > how do we write this in webpy >> >> > thanks a lot > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
