Intent to Prototype: Speculation-Rules header

237 views
Skip to first unread message

Iman Saboori

unread,
Oct 28, 2022, 2:42:54 PM10/28/22
to blin...@chromium.org

Contact emails

 jbr...@chromium.org, isab...@google.com, mc...@chromium.org, dom...@chromium.org

 

Explainer

https://github.com/WICG/nav-speculation/blob/main/triggers.md#the-proposal

 

Specification

To be started soon.

 

Summary

Currently developers can only specify speculation rules using inline script tags.  The proposed feature provides an alternative through the “Speculation-Rules'' header. Its value should be a URL to a text resource with “application/speculationrules+json” MIME type. The resource's rules will be added to the document's rule set

 

 

Blink component

Internals>Preload

 

Motivation

To adopt speculation rule based preloading, the current approach of using the script tag to specify speculation rules requires modifying existing documents, which is more difficult for some authors to deploy. The proposed Speculation-Rule header provides an alternative to facilitate adoption of the speculation rule based preloading.

 

 

Initial public proposal

https://github.com/WICG/nav-speculation/blob/main/triggers.md#the-proposal

 

TAG review

Not yet required

 

TAG review status

Not yet required

 

Risks

 

 

Interoperability and Compatibility

 

 

Gecko: No signal

 

WebKit: No signal

 

Web developers: No public signals

 

Other signals:

 

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

No

 

 

Debuggability

Will be possible to debug on the new preloading DevTools tab.

 

Is this feature fully tested by web-platform-tests?

Yes, WPT will fully test this feature.

 

Flag name

SpeculationRulesFetchFromHeader

 

Requires code in //chrome?

False

 

Estimated milestones

Expect to land the code in M110 and send Intent to Experiment.

 

 

Link to entry on the Chrome Platform Status

https://chromestatus.com/guide/edit/5069400512659456


Reply all
Reply to author
Forward
0 new messages