对 iis7 上的 PHP Http 压缩进行故障排除
只需在 iis7 中检查“启用动态内容压缩”对我的 .php 文件的传输大小没有影响(通过 Firebug 和 Fiddler 确认)。
尽管这里的这篇简短文章表明它确实如此简单:http://www.dotnetscraps.com/dotnetscraps/post/IIS-775-FastCGI-hosting-PHP-and- Compression.aspx
我关注了这个论坛帖子 http://forums.iis.net/t/1159141.aspx 但无法跟踪任何建议压缩的内容失败的。
我应该放弃并使用 PHP 的“zlib”压缩吗?
Simply checking "Enable dynamic content compression" in iis7 has no effect on the transmitted size of my .php files (confirmed via Firebug and Fiddler).
This is in spite of this brief article here that suggests it really is that simple: http://www.dotnetscraps.com/dotnetscraps/post/IIS-775-FastCGI-hosting-PHP-and-Compression.aspx
I followed this forum post http://forums.iis.net/t/1159141.aspx but could not trace anything that suggested compression failed.
Should I just give up and use PHP's "zlib" compression instead?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查您的 .config 文件以确保您在dynamicTypes 中有正确的application/json 条目。
由于我们尚未弄清楚的原因,我们的 IIS 服务器的 Content-Type 响应标头存在一些可变性,您需要与 IIS 吐出的内容完全匹配,否则它不会压缩内容,唉:
如果您仍然有运气不好,请发布完整的 HTTP 响应标头。
Check your .config file to make sure you have the right application/json entries in dynamicTypes.
For reasons we haven't figured out yet our IIS server has some variability in its Content-Type response headers and you need to exactly match what IIS is spitting out otherwise it won't compress the content, ala:
If you're still having no luck, please post your full HTTP Response headers.