API (Speculation Rules API) URL . . (conservative eagerness) . (moderate) ( ) > .
/ . – – . ( ) . .
URL ( ). CSS no-prerender ( <a>) . .
API API . . .
Speculation Rules .
- > .
- Speculative Loading .
- .
-
speculation-rules/wp-content/plugins/. - .
- .
- > .
- .
-
URL
-
URL . URL . URL
/wp-login.php/wp-admin/*. URLwp_nonce_url()(_wpnonce)nofollow. URLplsr_speculation_rules_href_exclude_paths.URL
https://example.com/cart/https://example.com/cart/foo:<?php add_filter( 'plsr_speculation_rules_href_exclude_paths', function ( array $exclude_paths ): array { $exclude_paths[] = '/cart/*'; return $exclude_paths; } );URL . .
plsr_speculation_rules_href_exclude_paths( “prefetch” “prerender”) .URL
https://example.com/products/...:<?php add_filter( 'plsr_speculation_rules_href_exclude_paths', function ( array $exclude_paths, string $mode ): array { if ( 'prerender' === $mode ) { $exclude_paths[] = '/products/*'; } return $exclude_paths; }, 10, 2 );CSS
no-prerender( ).rel=nofollowidempotent ( ) POSTwp_nonce_url(). -
-
. URL URL . .
(pretty permalinks)
plsr_enabled_without_pretty_permalinks:<?php add_filter( 'plsr_enabled_without_pretty_permalinks', '__return_true' ); -
-
(analytics) .
( ) . ( Google Analytics) . (cross-origin) .
moderate() .eager() . / () .( /) . !
<script>API JavaScript DOM . -
-
. issue . .
-
-
. .
-
“ (Speculative Loading)” . .
1.7.0
- Add
declare( strict_types = 1 )to all PHP files. (2424) - Bump minimum required WordPress version to 6.9. (2517)
- Bump minimum required PHP version from 7.2 to 7.4. (2469)
- Improve code quality with native property types and stricter static analysis. (1729)
- Harden the JSON encoding of the inline speculation rules script and add a
sourceURLto the authentication admin notice script. (2169)
1.6.0
1.5.0
- API API . (1883)
1.4.0
- . (1784)
1.3.1
- rel nofollow nofollow . (1232)
1.3.0
1.2.2
- href JSON URL /. (1164)
- readme . (1155)
1.2.1
1.2.0
- uninstall.php . (1128)
1.1.0
1.0.1
1.0.0
- . (733)