最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - speeding up ajax requests - can gzip compression be applied? - Stack Overflow

programmeradmin1浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论