這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

LH Add Headers

外掛說明

A 304 Not Modified HTTP Header tells your visitors that nothing has changed since their last visit. This is important as without this header visitors may be downloading your webpages from scratch each time, slowing down their experience and your site.

Generally if you do not pass 304 Not Modified HTTP Header through your HTTP header, crawlers will fetch your whole website and then compare the content of your site with the already indexed content to check whether anything new has been updated on your website or not. But this process consumes a lot of your server resource and bandwidth.

You can know more about it here.

Before reading any further

Before reading any further it is important to understand this plugin uses output buffering, in fact the Etag sent by this plugin is a hash of the sites buffered content. If your site uses server side caching this plugin may break the caching functionality. Therefore I suggest that you please make sure you have studied the FAQ, before installation and activation.

安裝方式

  1. Upload the entire lh-add-headers folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress. That is it.

常見問題集

Installation Instructions
  1. Upload the entire lh-add-headers folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress. That is it.
Will this plugin cause problem if you use server side caching?

Quite possibly depending on your setup. It could prevent caching or even break your site if you are using server side caching (including Varnish). This plugin should NOT be used on hosts like WPEngine or DreamPress as it will break caching.

How do I check if it is working?

Install one of the the view live HTTP headers tools in your browser. Visit your website and then refresh the page. On your second visit the website should return a 304 not modified response.

Are there other reason why a 304 header is not being return when I haven’t changed the content?

In order to to return 304 the hash of the returned content must be the same (IE the html must be identical between requests.
Unfortunately, some plugin adding dynamic and varying content to each page output returned. Try disabling each plugins to find the culprit.

What are the benefits?

This helps visitors and search engines. If your page or post has not been updated since the last visit, then your page will sent a 304 Not Modified Header. On receipt of this header search engines know nothing has changed (and therefore there is no need to re crawl your site), likewise a normal visitors browser will get a 304 and will use the browser side cache of the page (thus speeding up the visitors experience).

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈LH Add Headers〉的開發相關工作。

參與者

將 LH Add Headers 外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.00 April 15, 2016
Initial release.

1.01 May 05, 2016
Code improvement

1.02 May 19, 2016
Fixed customiser issue

1.03 June 22, 2016
Fixed documentation link

1.04 April 30, 2017
Added class check

1.05 May 10, 2017
Keep comments in outputted source