php - zlib.output_compression and output_buffering -


can compress output setting zlib.output_compression directive on, , set output_buffering directive off?

secondly read can set number value zlib.output_compression directive specifies specific buffer size. if set output_buffering directive different number value of bytes? max buffer size?

  1. yes, can compress php output way, web-servers (nginx, apache) can such compressing more effective type of content (css assets, etc), not php output :)

  2. yes, can set zlib.output_compression numeric value http://php.net/manual/en/zlib.configuration.php#ini.zlib.output-compression

    this option accepts integer values instead of boolean "on"/"off", using can set output buffer size (default 4kb). max buffer size, cant set more web-server can handle. example, nginx use 4k or 8k output buffer. http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_buffer_size

  3. ob_gzhandler compression level use zlib.output_compression_level, -1 per default, level 6 (the default value, -1, lets server decide level use). but! php manual http://php.net/manual/en/function.ob-gzhandler.php said:

    you cannot use both ob_gzhandler() , zlib.output_compression. note using zlib.output_compression preferred on ob_gzhandler().


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -