[Gambas-user] Property Webpage.Buffered

Benoit Minisini benoit.minisini at gambas-basic.org
Sun Nov 20 18:01:22 CET 2022

Le 20/11/2022 à 17:47, Hans Lehmann a écrit :
> Hello.
> I need help regarding the meaning of setting the property 
> Webpage.Buffered = True of the class Webpage (gb.web). The default value 
> is False. To put it another way: Under what conditions does it make 
> sense to set the value of the Webpage.Buffered property to `True`?
> With kind regards
> Hans

If WebPage.Buffered is FALSE, the standard output is not buffered by 
Gambas. It means that the generated response is sent directly to the 
standard output, usually a HTTP server pipe.

If WebPage.Buffered is TRUE, the entire request response is buffered, 
and sent in one shot to the HTTP server.

In other words, when WebPage.Buffered is TRUE, you are sure that the 
client browser will receive the resulting HTML page (for example) the 
later as possible but in one shot.

Otherwise, the client browser may receive a partial answer to its 
request while the CGI script is generating it. A generated HTML page 
arrives faster, but the browser may display part of it while waiting the 
request to be completed.


Benoît Minisini.

More information about the User mailing list