I am a web developer. Using header() in my script sets "Transfer-Encoding:chunked". and flush() to the web page. It will be printed in a time-shared manner in the web page. Works fine. However, when I request this.it using jQuery.ajax(), it is always outputted together (chunking is useless).
how to solve this problem? Using chunked encoding in jQuery ajax?
You cannot use jquery.ajax to read chunked http responses continuously. jquery ajax only calls the success callback function when the connection is terminated. you should useThisjquery plugin.
If you use php, you can use the following code:
On the server side:
Stream.php