谁能告诉我使用mod_deflate模块之间和zlib output_com pression?
Can anyone tell me the difference between using mod_deflate and zlib output_compression?
据我所知,zlib的工作是在PHP和mod_deflate模块是宇瞻做的,我的.htaccess文件如下:
I understand that zlib is done in PHP and mod_deflate is done in Apace, my .htaccess file looks like:
php_flag zlib.output_compression On
或
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI
.(?:gif|jpe?g|png|gif)$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
优点/任的缺点是什么?
Advantages/disadvantages of either?
据我所知,他们都COM preSS作为zlib.output_com pression使用gzip压缩同量,这是基于DEFLATE。
As far as I know they both compress the same amount as zlib.output_compression uses gzip, which is based on DEFLATE.
PHP的zlib的output_com pression将只通过PHP处理程序(即.php文件)通过的文件,但Apache的mod_deflate模块可以在任何文件的工作(如静态CSS和JS)。
PHP's zlib output_compression will only work files passed through the PHP handler (i.e. .php files), but Apache's mod_deflate can work on any files (eg static CSS or JS).
上一篇:preSTASHOP NGINX +重写规则重写、规则、preSTASHOP、NGINX
下一篇:URL重写休息时的index.php URL =指数?(参数"指数")。为什么?指数、重写、参数、URL