18.4.0 released Sep 25, 2023
Flush output

Purpose: Flush output.

flush-output

Use flush-output statement to flush any pending output to the client (such as FastCGI-command-line-client) or from the command-line application.

This can be useful if the complete output would take longer to produce and intermittent partial output would be needed.

Note that whether the client will actually receive the output in this fashion depends on several factors, including the client itself and any intermediaries such as proxy servers.
Examples
In this case the complete output may take at least 20 seconds. With flush-output, the message "This is partial output" will be flushed out immediately.
@This is partial output
flush-output
sleep(20);
@This is final output

See also
Output
finish-output  
flush-output  
output-statement  
p-dbl  
pf-out  
pf-url  
pf-web  
p-num  
p-out  
p-path  
p-url  
p-web    
See all
documentation


You are free to copy, redistribute and adapt this web page (even commercially), as long as you give credit and provide a link back to this page (dofollow) - see full license at CC-BY-4.0. Copyright (c) 2019-2023 Dasoftver LLC. Vely and elephant logo are trademarks of Dasoftver LLC. The software and information on this web site are provided "AS IS" and without any warranties or guarantees of any kind.