[Web-SIG] My original template API proposal
matt at pollenation.net
Tue Feb 7 16:08:51 CET 2006
Guido van Rossum wrote:
> On 2/5/06, Ian Bicking <ianb at colorstudy.com> wrote:
>>I suspect most templates will buffer their output internally, unless
>>somehow configured or dynamically set not to do so.
> Why would they? Isn't that a function that the web server typically does?
I've not seen anyone respond to this, and I'm not sure if it was meant
entirely in the context of rendering templates but ...
I don't think a web server should buffer anything except for perhaps
small blocks of data on their way to a socket.
It's perfectly valid to stream HTML from the application code and most
browsers will have a go at rendering it as it arrives (although to be
honest, it's of dubious use ;-).
However, there are plenty of file formats that support streaming,
progressive rendering, frames, etc. It's possible to explicitly make use
of this from application code (i.e. sending images in "real-time" as GIF
Buffering to avoid sending any headers out of sequence is something the
templating engine or (perhaps) the web framework should do. The web
server should stick to shuffling bytes around the internet.
/ \__ Matt Goodall, Pollenation Internet Ltd
\__/ \ w: http://www.pollenation.net
__/ \__/ e: matt at pollenation.net
/ \__/ \ t: +44 (0)113 2252500
/ \ Any views expressed are my own and do not necessarily
\__/ reflect the views of my employer.
More information about the Web-SIG