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

首頁外掛目錄 › Far Future Expiry Header
WordPress 外掛 Far Future Expiry Header 的封面圖片
7,000+
安裝啟用
★★★☆☆
3.2/5 分(31 則評價)
94 天前
最後更新
問題解決
WordPress 5.5+ v1.6 上架:2014-03-05

內容簡介

此外掛提供了幾個輕量級功能,可加快 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) 通過使用 “檔案類型” 區域中的核取方塊,選擇要為其啟用 “遠期到期” 功能的檔案類型

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

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

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.6) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Far Future Expiry Header」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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

延伸相關外掛

文章
Filter
Apply Filters
Mastodon