Title: Specify a Vary: Accept-Encoding Header
Author: lithiumsixteen
Published: <strong>2018 年 4 月 13 日</strong>
Last modified: 2018 年 4 月 13 日

---

搜索插件

![](https://ps.w.org/specify-a-vary-accept-encoding-header/assets/banner-772x250.
png?rev=1857583)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/specify-a-vary-accept-encoding-header/assets/icon-256x256.png?
rev=1857583)

# Specify a Vary: Accept-Encoding Header

 作者：[lithiumsixteen](https://profiles.wordpress.org/lithiumsixteen/)

[下载](https://downloads.wordpress.org/plugin/specify-a-vary-accept-encoding-header.1.0.0.zip)

 * [详情](https://cn.wordpress.org/plugins/specify-a-vary-accept-encoding-header/#description)
 * [评价](https://cn.wordpress.org/plugins/specify-a-vary-accept-encoding-header/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/specify-a-vary-accept-encoding-header/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/specify-a-vary-accept-encoding-header/#developers)

 [支持](https://wordpress.org/support/plugin/specify-a-vary-accept-encoding-header/)

## 描述

Many WordPress performance plugins are bloated and include features that you don’t
need. This plugin does just one thing. It adds a “Vary: Accept-Encoding Header” 
to boost website performance.

When browsers make a request, they include HTTP headers for the server to decide
what to send back. The Vary header describes what information identifies a request.
Caches should only be used if the request matches the Vary information in the cache.

This plugin adds a rewrite rule to your WordPress directory’s `.htaccess` Apache
file.

    ```
    < IfModule mod_headers.c >

      < FilesMatch \".(js|css|xml|gz|html)$\" >

        Header append Vary: Accept-Encoding

      < /FilesMatch >

    < /IfModule >
    ```

## 屏幕截图

[⌊Example Page Speed Scores before installing⌉⌊Example Page Speed Scores before 
installing⌉[

Example Page Speed Scores before installing

[⌊Example Page Speed Scores after installation of this plugin⌉⌊Example Page Speed
Scores after installation of this plugin⌉[

Example Page Speed Scores after installation of this plugin

## 安装

No configuration required.

This plugin can be installed directly through your WordPress Plugins dashboard. 
Click “Add New” and Search for “Vary: Accept-Encoding Header”.

Then Install and Activate.

Alternatively, you can download the plugin using the download button on this page
and then upload the `specify-a-vary-accept-encoding -header` folder to the `/wp-
content/plugins/` directory then activate through the Plugins dashboard in WordPress.

## 常见问题

  Installation Instructions

No configuration required.

This plugin can be installed directly through your WordPress Plugins dashboard.

Click “Add New” and Search for “Vary: Accept-Encoding Header”.

Then Install and Activate.

Alternatively, you can download the plugin using the download button on this page
and then upload the `specify-a-vary-accept-encoding -header` folder to the `/wp-
content/plugins/` directory then activate through the Plugins dashboard in WordPress.

  Why might this plugin not work for me?

There are a couple of reasons why this may not work for you.
 If your server is 
running NGINX, you will probably need to update the NGINX configuration. This can’t
be done from within WordPress itself. The primary NGINX configuration file is `/
etc/nginx/nginx.conf`. Add this code to the file: `gzip_vary on`. Also, this will
only work for requests that are on your server. If you have third party requests,
there is nothing you can do because you don’t have access to their web servers.

## 评价

![](https://secure.gravatar.com/avatar/74d2729a52328d95d5cd2623383cf0e4a4129e4827dedde3ca1b8f1e0e4e8efc?
s=60&d=retro&r=g)

### 󠀁[Not working for me.](https://wordpress.org/support/topic/not-working-for-me-216/)󠁿

 [longjohn1](https://profiles.wordpress.org/longjohn1/) 2018 年 8 月 23 日

Didn’t work for me.

![](https://secure.gravatar.com/avatar/5ffcab15edc08f5f54b26e2e496f4eca42ffc4a02492d7c8f4a0873c603e77f5?
s=60&d=retro&r=g)

### 󠀁[Worked amazingly !!!!](https://wordpress.org/support/topic/worked-amazingly/)󠁿

 [dreduq](https://profiles.wordpress.org/dreduq/) 2018 年 8 月 16 日

it does exactly what it says. Worked great so far. 🙂

![](https://secure.gravatar.com/avatar/b30fb334e1dc00d2802476fd2cb970724ab8246564db9f6d5d5465173dfdaecb?
s=60&d=retro&r=g)

### 󠀁[Perfect score!](https://wordpress.org/support/topic/perfect-score/)󠁿

 [markmapstone](https://profiles.wordpress.org/markmapstone/) 2018 年 8 月 9 日

This instantly worked – and kicked my site up to a performance score of 97 on Pingdom.

![](https://secure.gravatar.com/avatar/c6f9cc10f4d432bdd19b708db089a864ce0c24264312b2b782276cb86c9c1831?
s=60&d=retro&r=g)

### 󠀁[Worked great!](https://wordpress.org/support/topic/worked-great-136/)󠁿

 [marcfuller](https://profiles.wordpress.org/marcfuller/) 2018 年 5 月 20 日

Thanks!

 [ 阅读所有4条评价 ](https://wordpress.org/support/plugin/specify-a-vary-accept-encoding-header/reviews/)

## 贡献者及开发者

「Specify a Vary: Accept-Encoding Header」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ lithiumsixteen ](https://profiles.wordpress.org/lithiumsixteen/)

[帮助将「Specify a Vary: Accept-Encoding Header」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/specify-a-vary-accept-encoding-header)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/specify-a-vary-accept-encoding-header/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/specify-a-vary-accept-encoding-header/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/specify-a-vary-accept-encoding-header/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/specify-a-vary-accept-encoding-header/)。

## 更新日志

### 1.0

 * Initial release

## 额外信息

 *  版本 **1.0.0**
 *  最后更新：**8 年前**
 *  活跃安装数量 **200+**
 *  WordPress 版本 ** 3.0.1 或更高版本 **
 *  已测试的最高版本为 **4.9.29**
 *  PHP 版本 ** 5.2 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/specify-a-vary-accept-encoding-header/)
 * 标签
 * [accept](https://cn.wordpress.org/plugins/tags/accept/)[performance](https://cn.wordpress.org/plugins/tags/performance/)
   [security](https://cn.wordpress.org/plugins/tags/security/)[speed](https://cn.wordpress.org/plugins/tags/speed/)
   [vary](https://cn.wordpress.org/plugins/tags/vary/)
 *  [高级视图](https://cn.wordpress.org/plugins/specify-a-vary-accept-encoding-header/advanced/)

## 评级

 4 星（最高 5 星）。

 *  [  3 条 5 星评价     ](https://wordpress.org/support/plugin/specify-a-vary-accept-encoding-header/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/specify-a-vary-accept-encoding-header/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/specify-a-vary-accept-encoding-header/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/specify-a-vary-accept-encoding-header/reviews/?filter=2)
 *  [  1 条 1 星评价     ](https://wordpress.org/support/plugin/specify-a-vary-accept-encoding-header/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/specify-a-vary-accept-encoding-header/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/specify-a-vary-accept-encoding-header/reviews/)

## 贡献者

 *   [ lithiumsixteen ](https://profiles.wordpress.org/lithiumsixteen/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/specify-a-vary-accept-encoding-header/)