Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 无法在Chrome';上查看内容编码属性;s响应头_Php_Wordpress_.htaccess_Gzip_Google Chrome Devtools - Fatal编程技术网

Php 无法在Chrome';上查看内容编码属性;s响应头

Php 无法在Chrome';上查看内容编码属性;s响应头,php,wordpress,.htaccess,gzip,google-chrome-devtools,Php,Wordpress,.htaccess,Gzip,Google Chrome Devtools,在Wordpress站点中,我启用了.htaccess上的gzip压缩。我已经检查了gzip压缩,并且内容编码显示正确 但当在Chrome的开发者工具上检查压缩时,它不会在响应部分显示内容编码: 以下是.htaccess压缩语句: AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFil

在Wordpress站点中,我启用了.htaccess上的gzip压缩。我已经检查了gzip压缩,并且
内容编码
显示正确

但当在Chrome的开发者工具上检查压缩时,它不会在响应部分显示内容编码:

以下是.htaccess压缩语句:

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddType x-font/otf .otf
AddType x-font/ttf .ttf
AddType x-font/eot .eot
AddType x-font/woff .woff
AddType image/x-icon .ico
AddType image/png .png

为什么Chrome不会显示gzip信息?

谷歌Chrome,就像Mozilla Firefox一样,似乎已经解码了内容。但两者之间有区别

请求头中会显示额外字段
接受编码:“gzip,deflate”
,但在响应头中没有
内容编码:gzip

使用Fiddler可以点击Transformer按钮(从响应标题部分)并选择对内容进行编码。然后单击Raw按钮检查是否正在使用内容编码

所以Fiddler更适合检查响应头

有趣的帖子: