Read this article to understand how response chunking works and how it might benefit your app.
To send a string as a chunk
$response->chunk($str);
To flush the contents of the output buffer as a response chunk
$response->chunk();
After calling chunk(), views will be chunked too
chunk()
$response->render('mytemplate.phtml');
Note: calling $response->chunk() for the first time sets the appropriate header (Transfer-Encoding: chunked).
$response->chunk()
Transfer-Encoding: chunked
There was an error while loading. Please reload this page.