Safari为什么显示奇怪的符号而不是HTML内容? [英] Why is Safari displaying weird symbols instead of HTML content?
问题描述
如果您使用Safari浏览此页面:
If you take a look at this page using Safari:
http://m2.monetarylane.com/product-category/women/
您会看到以下内容:
每个其他浏览器都会显示
Every other browser displays the content properly.
此服务器使用的是Mercury-Varnish + Nginx + HHVM + PHP5-FPM后备+ W3总缓存+ cloudflare。
This server is using Mercury - which is Varnish + Nginx + HHVM + PHP5-FPM fallback + W3 Total Cache + cloudflare.
我已经关闭了CSS和JS的缩小功能,所以不是那样。
I've switched off CSS and JS minification, so it's not that.
有人知道Safari为什么要这么做吗?
Any ideas why Safari is doing this?
推荐答案
这是由于与基于WebKit的浏览器(Safari,Chrome / Chromium,新Opera)相比,GZIP压缩中的某些错误引起的。对我有用的解决方案是在HHVM端禁用内容压缩,并仅在nginx中启用它。它由GzipCompressionLevel HDF运行时选项控制。
It's caused by some bug in GZIP compression vs. WebKit-based browers (Safari, Chrome/Chromium, new Opera). Solution, that worked for me, was disabling content compression in HHVM side and keeping it enabled only in nginx. It's controlled with GzipCompressionLevel HDF runtime option.
Server {
GzipCompressionLevel = 0
}
hhvm.server.gzip_compression_level = 0
也在php.ini中应该可以,但是我还没有测试过。
hhvm.server.gzip_compression_level = 0
in php.ini also should work, but I haven't tested that yet.
这篇关于Safari为什么显示奇怪的符号而不是HTML内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!