Enable Gzip Compress on Wordpress with WP-Cache 2.x启用gzip格式压缩的压缩与WordPress的可湿性粉剂缓存2.x中

WP-Cache is a page caching system plugin for可湿性粉剂缓存是页面缓存系统插件 Wordpress WordPress的 blog that cache Wordpress pages during the first load or after a page expired, and store each Wordpress page in a static HTML file which in turn used to serve future requests.博客,缓存WordPress的网页在第一负荷或之后到期的网页,并存储每个WordPress的网页在一个静态的HTML文件这反过来又用来提供未来的要求。 This process of web server serving the HTML pages directly from the file rather than building the page again by loading and compiling the whole PHP code, and retrieving the necessary data from the database where there is any page request significantly reduces the resource needed to run a responsive and fast website.这一进程的Web服务器服务的HTML网页直接从文件而不是网页建设,再次装载和编译整个PHP代码,并检索必要的数据从数据库中如果有任何网页的请求大大减少了资源的需要运行响应和快速的网站上。 Meanwhile, Gzip compression is an option provided by Wordpress that allows web server to serve the articles in compressed format if request by supported web browser, reducing bandwidth used and improving performance.与此同时, gzip格式压缩的压缩是一种选择提供了WordPress的,允许Web服务器提供服务的条款,如果压缩格式的请求支持的网络浏览器,减少带宽的使用和提高性能。

If you install WP-Cache version 2.0 or 2.1, you will be requested to turn off or disable Gzip compression in Options -> Reading tab.如果您安装可湿性粉剂缓存版本2.0或2.1 ,你将被要求关闭或禁用gzip格式压缩压缩选项-> “读标签。 Although WP-Cache2 is fast enough, however, you can still try to enable the Gzip compression to further speed up the web server, improve the overall performance of network and website, and save the network bandwidth, by using the following trick.虽然可湿性粉剂, Cache2是不够快,然而,你仍然可以尝试启用gzip格式压缩的压缩,以进一步加快网络服务器,全面提高网络和网站,并节省网络带宽,使用下面的伎俩。 The hack allows Gzip compression to be used with WP-Cache system, by making WP-Cache compress the page articles, instead of Wordpress.黑客可以gzip格式压缩的压缩,用于可湿性粉剂缓存系统,使可湿性粉剂缓存压缩的网页的文章,而不是WordPress的。

To turn on Gzip compression of web page while using WP-Cache 2, simply edit the wp-cache-phase1.php which is located in the WP-Cache plug-in folder inside the Plugins directory with text editor such as vi:要打开gzip格式压缩压缩网页,一边用可湿性粉剂缓存2 ,只需修改可湿性粉剂缓存phase1.php位于可湿性粉剂缓存插件文件夹内的插件目录文本编辑器,如六:

Add the following line:添加下面一行:

if ( extension_loaded(’zlib’) ) ob_start(’ob_gzhandler’);如果( extension_loaded ( ' zlib ' ) ) ob_start ( ' ob_gzhandler ' ) ;

Before this line:在此之前行:

foreach ($meta-»headers as $header) { foreach ( $元»标题标题美元) (

Note that you still should not turn on or enable the Gzip compress article in Wordpress.请注意,您仍然不应该打开或启用gzip格式压缩的压缩在WordPress的文章。 If you do so, WP-Cache will not work.如果您这样做,可湿性粉剂缓存将无法工作。

Source来源

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要说明:这是一台机器翻译网页这是“原样”提供,无保修。 Machine translation may be difficult to understand.机器翻译可能很难理解。 Please refer to请参阅 original English article英文原文的文章 whenever possible.只要有可能。

Share and contribute or get technical support and help at共享和贡献或获得技术支持和帮助 My Digital Life Forums 我的数字生活论坛 .



One Response to “Enable Gzip Compress on Wordpress with WP-Cache 2.x”一个响应“启用gzip格式压缩的压缩与WordPress的可湿性粉剂缓存2.x的”

  1. Web Hosting Coupon Codes虚拟主机优惠券代码
    September 20th, 2008 08:32二〇 〇八年9月20日8点32分
    1

    Thanks this code edit really increased my page load time由于此代码编辑确实增加了我的网页加载时间

Leave a Reply留下一个回复

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> 您可以使用这些标签: href="" title="">的<a <abbr title=""> <acronym title="">的<b> <blockquote cite=""> <cite>的<code> “删除日期时间= “ ” “的<em> <i> <q cite=""> <strike>的<strong>

Subscribe without commenting订阅没有评论


Custom Search

New Articles新文章

Incoming Search Terms for the Article收到的搜索字词的文章

cache compress windows 缓存压缩窗口 - - wordpress gzip WordPress的gzip格式压缩 - - wordpress compression WordPress的压缩 - - per site enable zlib compression support 每个网站启用zlib压缩支持 - - adsense russian gzip 俄罗斯gzip格式压缩的AdSense - - gzip wordpress gzip格式压缩WordPress的 - - internet explorer disable compression gzip Internet Explorer中禁用压缩gzip格式压缩 - - compress wordpress 压缩WordPress的 - - wordpress gzip plugin WordPress的gzip格式压缩插件 - - turn on gzip on wordpress 启用gzip格式压缩的WordPress的 - - wordpress gzip WordPress的gzip格式压缩 - -