Jump to content

How do I set the buffer size?


Recommended Posts

I am using ajax to get some data from the server, while the server loads the information, which could take a few minutes, the user just stairs at a loading sign until the server spews out the data all at once. What I would like to do is set the buffer size smaller, so that the server sends its data back as it is found. So the user can watch the list be populated.


I did find a function that might make it work the way I want it to, but I don't know how to use it.

I found this: HttpResponse::setBufferSize()

here: http://php.net/manual/en/function.httpresponse-setbuffersize.php


When I try to use it like a function I get this error:

Fatal error: Class 'HttpResponse' not found in ...test.php on line 2



echo HttpResponse::getBufferSize();


Could someone help me out please?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.