如何在目录级别的coldfusion上启用gzip压缩? [英] How do I enable gzip compression on a coldfusion at the directory level?
问题描述
我在ColdFusion 7上支持一个遗留的应用程序,并且页面上有很多空白,我想要gzip。
I'm supporting a legacy application on ColdFusion 7, and the pages are full of painful amounts of whitespace that I'd like to gzip away.
我知道我可以:
- 手动压缩索引类型文件中的所有内容(参考)
- 在web.xml中启用它我没有权限访问)
但我可以只是把权利< cfheader>或者类似于在此目录上触发gzipping的.htaccess类似的东西?
But can I just throw the right < cfheader > or something akin to a .htaccess that triggers gzipping on this directory?
推荐答案
有两种方法来实现压缩。在Web服务器级别(apache 1.3,带有 mod_gzip 或 mod_deflate , IIS_6 , IIS_7 )或应用程序服务器级别(通过 servlet过滤器)。
There are two ways to implement compression. At the web server level (apache 1.3 with mod_gzip or mod_deflate, IIS_6, IIS_7) or the application server level (coldfusion via a servlet filter).
恐怕这些是唯一的
否则,您将看到以下一个或多个:
Otherwise you'll be looking at one or more of these:
- 通过
cf管理员启用空格抑制。 - 使用< cfsetting
enablecfoutputonly =true/>其中
可能。 - 包装代码
suppressWhiteSpace =yes>< / cfprocessingdirective> - 使用< cfsilent>包装代码< / cfsilent>
- enabling whitespace suppression via cf administrator.
- using <cfsetting enablecfoutputonly="true"/> where possible.
- wrapping code with <cfprocessingdirective suppressWhiteSpace="yes"></cfprocessingdirective>
- wrapping code with <cfsilent></cfsilent>
这篇关于如何在目录级别的coldfusion上启用gzip压缩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!