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
1 Answer
Reset to default 7Yes, 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
版权声明:本文标题:php - speeding up ajax requests - can gzip compression be applied? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742027312a2415788.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论