v135 · performance
Speculation rules: target_hint field
This extends speculation rules syntax to allow developers to specify the target_hint field.
concepts
-
target_hint
The raw rule shape: declare
target_hintand observe the speculation rules registration. -
Pre-rendering for links that open in a new tab
The middle-click use case from the explainer: sites that route most traffic to
target="_blank"couldn't speed up the navigation.target_hint: "_blank"fixes that. -
target_hint router
Pick navigation kind —
_self,_blank, or a named target — and watch the speculation rule JSON build with the righttarget_hint. The verdict tells you whether Chrome can match the prerender on click. -
Prefetch Tester
Build and inject live
speculationrulesscripts withtarget_hint. Configure rule type, target hint, and eagerness, then inject — see which sample links become eligible and read back the registered rule set. Toggle between with and withouttarget_hintto see eligibility change fortarget="_blank"links.
why it shipped
In the Chromium implementation, we have accidentally created an architecture where it is hard to prerender a page without knowing what target window (or tab) it is going to be in. Currently we are always assuming that the prerender will be navigated to in the current window. The target_hint allows us to know a target window before starting prerendering.