admin管理员组

文章数量:1317909

I want to speed up my ajax requests, I'm returning large amounts of information from the requests and was wondering if any sort of pression could be applied here to speed things up a bit.

My ajax requests typically all send in JSON encoded objects such as objects and arrays which contain html elements and other stuff at times. My server sided code is php and I'm using the sajax library. Any ideas to speed things up would be greatly appreciated.

I want to speed up my ajax requests, I'm returning large amounts of information from the requests and was wondering if any sort of pression could be applied here to speed things up a bit.

My ajax requests typically all send in JSON encoded objects such as objects and arrays which contain html elements and other stuff at times. My server sided code is php and I'm using the sajax library. Any ideas to speed things up would be greatly appreciated.

Share Improve this question edited Jan 18, 2021 at 1:53 peterh 1 asked Jul 26, 2010 at 8:08 AliAli 7,49322 gold badges105 silver badges164 bronze badges 2
  • 1 Wouldn't it be easier to cut down on the large amounts of information and only pull the information in sequence when needed? – Kris van der Mast Commented Jul 26, 2010 at 8:11
  • I didn't get what you meant by in sequence? – Ali Commented Jul 26, 2010 at 8:14
Add a ment  | 

1 Answer 1

Reset to default 7

Yes, just enable the zlib.output_pression config in you php.ini. If the client sends the Accept-Encoding header containing gzip, then the output is automatically gzipped and sent to the client.

Another option is to do it by manually calling the ob_gzhandler function.

本文标签: phpspeeding up ajax requestscan gzip compression be appliedStack Overflow