| 开发者 | rviscomi |
|---|---|
| 更新时间 | 2026年8月20日 01:25 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp_head() in arbitrary order. This can lead to critical performance pitfalls:
<title>.<head> elements strictly according to browser critical rendering path priorities.
The Capo Head Priority Spectrum
Capo organizes elements into 11 strict priority tiers (Weight 10 down to 0):
<base>, <meta charset>, <meta name="viewport">, critical http-equiv headers (CSP, origin-trial, accept-ch).<title>.<link rel="preconnect">.<script src="..." async>.<style> blocks containing @import rules.<script> without defer/async).<link rel="stylesheet">, <style> blocks.<link rel="preload">, <link rel="modulepreload">.<script src="..." defer>, <script src="..." type="module">.<link rel="prefetch">, <link rel="dns-prefetch">, <link rel="prerender">, <script type="speculationrules">.<head> is immediately optimized.<!--[if ...]>), CDATA blocks, and inline script markup.<head> hygiene warnings and diagnostic status in Tools > Site Health and Admin Toolbar.?capo=off to any frontend URL to inspect the un-reordered head./wp-content/plugins/capo-head-optimizer directory, or install the plugin through the WordPress plugins screen directly.No. Capo uses a deterministic stable sort. If you have multiple stylesheets (all Weight 4) or multiple scripts (all Weight 5), they will maintain their exact original relative order.
Yes. Page caching plugins capture the output buffer generated by WordPress. With Capo activated, the cached HTML stored on disk or in memory will already have its <head> sorted, incurring 0ms runtime overhead for cached visitors.
You can view any page with ?capo=off appended to the URL to bypass reordering and compare your raw <head> output against the optimized output.
<script type="speculationrules">) classified as Weight 1 (Prefetch / Prerender) matching @rviscomi/capo.js v2.2.1.> inside quoted attributes, boolean attributes, and empty string attributes.<!--[if ...]>) and CDATA sections in <head>.$analysis parameter and static accessor/reset methods to Parser for optimized memory lifecycle management.<head> validation engine with Origin Trial binary token decoding and origin/expiry checks.<head> reordering.@rviscomi/capo.js rules and validation engine.?capo=off).