
內容簡介
此外掛為 WordPress 提供 Speculation Rules API 的支援,允許動態預取或預渲染特定 URL。與 WordPress 6.8 的保守預取不同,此外掛預設以中等熱情進行預渲染,並提供用戶介面以自訂模式和熱情度。
【主要功能】
• 支援 Speculation Rules API
• 預設中等熱情進行預渲染
• 提供設定介面以自訂熱情度
• 僅對登出用戶啟用預取功能
• 可選擇對所有登錄用戶啟用
• 支援排除特定 URL 路徑
外掛標籤
開發者團隊
原文外掛簡介
This plugin adds support for the Speculation Rules API, which allows defining rules by which certain URLs are dynamically prefetched or prerendered. This core Speculative Loading functionality was merged into WordPress 6.8, but it only prefetches with conservative eagerness by default. In contrast, this plugin defaults to prerendering with moderate eagerness (i.e. when interacting with a link), and it provides a user interface to customize the mode and eagerness via the “Speculative Loading” section on the Settings > Reading admin screen.
By default, speculative loading is only enabled for logged-out users, since unauthenticated pages are typically only eligible for caching and so more efficient to prefetch/prerender. This means that sites with frequent logged-in users on the frontend—such as e-commerce, forums, or membership sites—will not benefit from the feature. If your server can handle the additional load (for example, with persistent object caching), you can opt in to enable speculative loading for all logged-in users or for administrators only. This setting exclusively affects frontend pages; admin screens are always excluded.
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.
