[WordPress] 外掛分享: Speculative Loading

WordPress 外掛 Speculative Loading 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Speculative Loading」是 2024-01-18 上架。
  • 目前有 60000 個安裝啟用數。
  • 上一次更新是 2025-04-09,距離現在已有 25 天。
  • 外掛最低要求 WordPress 6.6 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.2 以上。
  • 有 18 人給過評分。
  • 論壇上目前有 3 個提問,問題解答率 67% ,不低,算是個很有心解決問題的開發者團隊了!

外掛協作開發者

wordpressdotorg |

外掛標籤

prefetch | prerender | javascript | performance | speculation rules |

內容簡介

- 這個 WordPress 外掛支援 Speculation Rules API,該 API 可以根據使用者互動,定義規則來動態預取或預渲染特定的 URL。
- 請參閱 Speculation Rules WICG 規範草案。
- 預設情況下,當使用者將滑鼠懸停在相關連結上時,外掛會預渲染 WordPress 前端網址。可以透過在「設定」>「閱讀」下的「Speculation Rules」部分自訂此功能。
- 可以使用篩選器來排除某些 URL 路徑不符合預取和預渲染的條件(請參閱常見問題解答)。或者,您可以將「no-prerender」CSS 類別添加到不應該預渲染的任何連結( 標籤)上。
- 瀏覽器支援:Speculation Rules API 是一個新的 Web API,外掛目前使用的具體語法需要使用 Chrome 121+。
- 其他瀏覽器不會遇到任何負面影響,但對於那些瀏覽器來說,此功能將無法運作。

一般 Speculation Rules API 的瀏覽器支援
外掛使用的文件規則語法支援相關資訊

原文外掛簡介

This plugin adds support for the Speculation Rules API, which allows defining rules by which certain URLs are dynamically prefetched or prerendered.
See the Speculation Rules WICG specification draft.
By default, the plugin is configured to prerender WordPress frontend URLs when the user interacts with a relevant link. This can be customized via the “Speculative Loading” section in the Settings > Reading admin screen.
A filter can be used to exclude certain URL paths from being eligible for prefetching and prerendering (see FAQ section). Alternatively, you can add the no-prerender CSS class to any link (
tag) that should not be prerendered. See FAQ for more information.
Browser support
The Speculation Rules API is a new web API, and the functionality used by the plugin is supported in Chromium-based browsers such as Chrome, Edge, or Opera using version 121 or above. Other browsers such as Safari and Firefox will ignore the functionality with no ill effects; they will simply not benefit from the speculative loading. Note that certain browser extensions may disable preloading by default.

Browser support for the Speculation Rules API in general
Information on document rules syntax support used by the plugin

This plugin was formerly known as Speculation Rules.

各版本下載點

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

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


1.0.0 | 1.0.1 | 1.1.0 | 1.2.0 | 1.2.1 | 1.2.2 | 1.3.0 | 1.3.1 | 1.4.0 | 1.5.0 | trunk |

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

  • Shortcoder — Create Shortcodes for Anything 》Shortcoder 外掛可讓您建立 HTML、JavaScript、CSS 和其他代碼片段的自訂捷徑。現在,這些捷徑可以在文章/頁面中使用,並且該片段將取代其位置。, ✍ 輕鬆建立...。
  • Enable jQuery Migrate Helper 》隨著 WordPress 5.5 的更新,一個名為 jquery-migrate 的遷移工具不再默認啟用。這可能會導致一些主題或外掛在運行舊代碼時缺少功能或出現意外行為。, 此外掛...。
  • Async JavaScript 》使用 Async Javascript 解決 above-the-fold 內容的 Render-blocking Javascript 問題。, Render-blocking Javascript 會導致 above-the-fold 內容在 Javascr...。
  • Scripts n Styles 》這個外掛讓管理員用戶能夠將自訂的 CSS 和 JavaScript 直接添加到個別文章、頁面或任何註冊的自訂文章類型中,也可以將類別添加到 body 標籤和文章容器中。還...。
  • jQuery Updater 》此外掛更新jQuery至最新的官方穩定版本,該版本通常不會在WordPress最新的穩定版本中提供。, jQuery Migrate也包含在內,以實現向下相容性。, 不會替換任何檔...。
  • Theme Authenticity Checker (TAC) 》掃描所有主題文件,尋找潛在的惡意或不需要的程式碼。, TAC 是什麼, TAC 代表主題真實性檢查器。TAC 搜尋每個安裝主題的原始檔案,尋找惡意程式碼的跡象。如...。
  • Code Embed 》注意: WordPress 5.0 及以上版本的使用者請查看常見問題以了解如何在區塊編輯器中使用此外掛。, Code Embed 外掛允許您在文章中嵌入程式碼(JavaScript 和 H...。
  • Read More Without Refresh 》你想顯示更多內容,但不影響使用者體驗嗎?, 我的外掛可以幫你解決這個問題!, 這個外掛透過短碼,可以隱藏預先定義好的文字,而根據你的選擇,只顯示剩下的...。
  • Raw HTML 》is capability is only granted to administrators. If you’re not an admin, you will need to ask them to add it to your role., Raw HTML is not r...。
  • SOGO Add Script to Individual Pages Header Footer 》已經在 Gutenberg 上進行測試, 創建一個簡單的方式,為個別頁面、文章或自訂文章類型的標題和頁腳添加 JavaScript 代碼,, 例如: 在感謝頁面上添加轉換代碼, ...。
  • BJ Lazy Load 》延遲載入可使您的網站加載速度更快,並節省頻寬。, 此外掛可取代您所有的文章圖片、文章縮略圖、大頭貼圖片和內容的 iframe,並使用佔位圖片,當訪客滾動頁面...。
  • Web Worker Offloading 》**總結:**, 這個外掛將 JavaScript 執行工作委派給 Web Worker,在釋放主執行緒的同時提高了效能。這將導致互動至下一次繪製(INP)分數的提升。值得注意的...。
  • WP Super Minify • Minify, Compress and Cache HTML, CSS & JavaScript 》這個外掛可以在需要時結合、縮小和緩存內聯的 JavaScript 和 CSS 文件,以加快頁面加載速度,並使用Minify PHP Framework。, 啟用此外掛後,您會發現您的 HTM...。
  • Use Google Libraries 》e's content distribution network (CDN) URLs for the supported libraries., This hook is used to replace the default WordPress registered script sour...。
  • Custom CSS and JavaScript 》這款外掛可以讓您在 WordPress 網站中添加自訂全站 CSS 樣式和 JavaScript 代碼,有助於覆蓋佈景主題樣式和添加客戶端功能。功能包括:, , 代碼編輯器,帶有...。

文章
Filter
Mastodon