[WordPress] 外掛分享: Far Future Expiry Header

WordPress 外掛 Far Future Expiry Header 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Far Future Expiry Header」是 2014-03-05 上架。
  • 目前有 9000 個安裝啟用數。
  • 上一次更新是 2025-04-11,距離現在已有 23 天。
  • 外掛最低要求 WordPress 5.5 以上版本才可以安裝。
  • 有 30 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

tips-and-tricks-hq |

外掛標籤

cache | expiry | expiry header | expires header | far future expiration |

內容簡介

此外掛提供了幾個輕量級功能,可加快 WordPress 網站的速度,並且不需要太多的麻煩。

遠期到期

啟用此功能後,此外掛將修改您的 .htaccess 檔案,插入程式碼,並為常見靜態檔案類型添加到期標頭。

到期標頭指定一個足夠晚的時間,使得瀏覽器不會再次獲取未更改的圖像、CSS、JavaScript 等檔案(這會減少 HTTP 請求),從而在後續頁面查看時提高效能。

gzip 壓縮

您也可以使用此外掛在網站上啟用 gzip 壓縮。gzip 壓縮會通過壓縮頁面輸出並將其發送到訪客的瀏覽器來加快 WordPress 網站的速度。

啟用此功能後,如果訪客的瀏覽器可以處理,外掛將執行 gzip 壓縮。

此功能可能會與一些其他外掛發生衝突。因此,如果需要使用無法與 gzip 壓縮配合使用的外掛,請禁用此功能。

用法

要使用此插件,請執行以下操作:

1) 確保您的主機的主要配置檔案中啟用了 “mod_expires” 模組

2) 與您的主機提供商檢查,或者如果您可以訪問 httpd.conf 檔案,請取消註釋以下行:
LoadModule expires_module modules/mod_expires.so

3) 啟用 “遠期到期” 核取方塊

4) 設定到期的天數

5) 通過使用 “檔案類型” 區域中的核取方塊,選擇要為其啟用 “遠期到期” 功能的檔案類型

注意:當您使用此外掛時,所選擇的檔案類型被快取在瀏覽器中,直到它們到期。因此,您不應該使用此功能在經常更改的檔案上。

有關詳細信息,請參閱 插件的文件頁面

原文外掛簡介

This plugin offers a few lightweight features to speed up your WordPress site without much hassle.
Far Future Expiry
When the feature is enabled, this plugin will modify your .htaccess file by inserting code which will add expires headers for common static file types.
Expiry header specifies a time far enough in the future so that browsers won’t try to re-fetch images, CSS, javascript etc files that haven’t changed (this reduces the number of HTTP requests) and hence the performance improvement on subsequent page views.
Gzip Compression
You can also enable Gzip compression on your site using this plugin. Gzip compression will speed up your WordPress site by compressing the page output and sending it to your visitors browser.
When enabled, the plugin will do gzip compression if the visitor’s browser can handle it.
This feature may conflict with a few other plugins. So disable this feature if you need to use a plugin which doesn’t work with gzip compression.
Usage
To use this plugin do the following:
1) Ensure that the “mod_expires” module is enabled from your host’s main configuration file
2) Check with your hosting provider or if you have access to the httpd.conf file the following line should be uncommented:
LoadModule expires_module modules/mod_expires.so
3) Enable the “Far Future Expiration” checkbox
4) Set the number of days till expiry
5) Select the file types you wish to enable the “far future expiration” feature for by using the checkboxes in the “File Types” section
NOTE: When you use this plugin, the file selected file types are cached in the browser until they expire. Therefore you should not use this on files that change frequently.
More details can be found on the plugin’s documentation page

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Far Future Expiry Header」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.4 |

延伸相關外掛(你可能也想知道)

文章
Filter
Apply Filters
Mastodon