开发者 | LithiumSixteen |
---|---|
更新时间 | 2018年4月13日 11:29 |
PHP版本: | 5.2 及以上 |
WordPress版本: | 4.9.5 |
版权: | GPL v2+ |
版权网址: | 版权信息 |
.htaccess
Apache file.
< IfModule mod_headers.c >
< FilesMatch \".(js|css|xml|gz|html)$\" >
Header append Vary: Accept-Encoding
< /FilesMatch >
< /IfModule >
specify-a-vary-accept-encoding -header
folder to the /wp-content/plugins/
directory then activate through the Plugins dashboard in WordPress.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.