【发布时间】:2013-02-14 09:30:38
【问题描述】:
当我执行时:
sudo a2dismod deflate
sudo service apache2 restart
在 Chrome Web Tools 中刷新并检查我网站的响应标头,我的资产(css 和 js)仍被标记为 Content-Encoding : gzip。 Y-Slow 还确认除了实际的 html 文档之外的所有资产仍然被压缩。
我在 CodeIgniter 的配置文件中关闭了输出压缩:
$config['compress_output'] = FALSE;
对于它的价值......虽然禁用了 deflate 模块我认为这并不重要,我的 /etc/apache2/mods-available/deflate.conf 文件是系统默认值:
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript
AddOutputFilterByType DEFLATE application/rss+xml
</IfModule>
我正在运行 Ubuntu 12.04。还有什么可能导致我的资产被压缩?
我的.htaccess 文件没有放气命令。
【问题讨论】:
-
你为什么不需要它被 gzip 压缩?!!
-
我显然需要把它压缩到最后。我现在正在运行诊断程序。我可以重新启用它并完成它 - 但作为一个希望从上到下了解他的系统的开发人员......总会有那个大问号。我讨厌大问号。谁能回答这个问题,我们可以从中学到宝贵的一课——对我来说,这比什么都重要。
标签: apache codeigniter apache2