(1) An extension to speculation rules syntax that lets the browser obtain URLs for speculation from link elements in a page. They may include criteria which restrict which of these links can be used.
(2) Adding the eagerness field to the speculation rules will let the developers control how eagerly the browser preloads links in order to balance the performance advantage against resource overhead. This field accepts one of "conservative", "moderate", "eager", or "immediate" strings as the value, and it is applicable to both "prefetch" and "prerender" actions and both "list" or "document" sources. If not explicitly specified, list rules default to "immediate" and document rules default to "conservative".
(3) Currently developers can only specify speculation rules using inline script tags. The proposed feature provides an alternative through the "Speculation-Rules" header. Its value must 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.
Because authors cannot rely on document rules being evaluated (or preloading generally), applications which use them should function correctly in other browsers and should continue to function correctly were the feature to be deprecated. Of course, ideally other browsers do find it compelling to implement this feature.
Similar reasoning applies to the response header and eagerness field.
Some developers might not be immediately aware of which URLs they can prefetch or prerender without side effects; this risk is reduced if they primarily use the feature for same-origin URL patterns they are familiar with.
See https://wicg.github.io/nav-speculation/speculation-rules.html#security-considerations.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
Speculative loading which occurs is visible in the Network panel and the new Preloading panel. Console warnings are logged when several types of issues are encountered.
https://wpt.fyi/results/speculation-rules?label=experimental&label=master&aligned Some tests cover behavior which isn't enabled by default (even if experimental web platform features are on).
Shipping on desktop | 121 |
OriginTrial desktop last | 120 |
OriginTrial desktop first | 110 |
Shipping on Android | 121 |
OriginTrial Android last | 120 |
OriginTrial Android first | 110 |
OriginTrial webView last | 120 |
OriginTrial webView first | 110 |
A URLPattern change was made to facilitate this, and document rules will be affected by upstream changes to URLPattern. Similarly, upstream changes to CSS selectors will affect document rules which use selectors to match. Some minor changes to how links are identified may happen in the future. We anticipate most changes to be compatible.
(3) Currently developers can only specify speculation rules using inline script tags. The proposed feature provides an alternative through the "Speculation-Rules" header. Its value must 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.
Note: This intent email spans three Chromestatus entries for different sub-features that we experimented with together and would like permission to ship together in M121.
Contact emails
jbr...@chromium.org, adit...@chromium.org, isab...@google.com, dom...@chromium.org, mc...@chromium.orgExplainer
https://github.com/WICG/nav-speculation/blob/main/triggers.mdSpecification
https://wicg.github.io/nav-speculation/speculation-rules.htmlSummary
(1) An extension to speculation rules syntax that lets the browser obtain URLs for speculation from link elements in a page. They may include criteria which restrict which of these links can be used.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACuR13dJ%2BLypC7QmGmwvoGn3%2BhPs77bDa-NFDWTw0bA5WDhsWA%40mail.gmail.com.
On Thu, Nov 16, 2023 at 12:33 AM Jeremy Roman <jbr...@chromium.org> wrote:Note: This intent email spans three Chromestatus entries for different sub-features that we experimented with together and would like permission to ship together in M121.
Contact emails
jbr...@chromium.org, adit...@chromium.org, isab...@google.com, dom...@chromium.org, mc...@chromium.orgExplainer
https://github.com/WICG/nav-speculation/blob/main/triggers.mdSpecification
https://wicg.github.io/nav-speculation/speculation-rules.htmlSummary
(1) An extension to speculation rules syntax that lets the browser obtain URLs for speculation from link elements in a page. They may include criteria which restrict which of these links can be used.
Any specific parts of the explainer/spec that cover this one?
On Wed, Nov 22, 2023 at 11:10 AM Yoav Weiss <yoav...@chromium.org> wrote:On Thu, Nov 16, 2023 at 12:33 AM Jeremy Roman <jbr...@chromium.org> wrote:Note: This intent email spans three Chromestatus entries for different sub-features that we experimented with together and would like permission to ship together in M121.
Contact emails
jbr...@chromium.org, adit...@chromium.org, isab...@google.com, dom...@chromium.org, mc...@chromium.orgExplainer
https://github.com/WICG/nav-speculation/blob/main/triggers.mdSpecification
https://wicg.github.io/nav-speculation/speculation-rules.htmlSummary
(1) An extension to speculation rules syntax that lets the browser obtain URLs for speculation from link elements in a page. They may include criteria which restrict which of these links can be used.
Any specific parts of the explainer/spec that cover this one?Sure:
LGTM2
/Daniel
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfX%2BNm3m5tsOv6VZsAzZeOeBkbYb8%2BUQmfBqabKjv0gyHw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/58f3233e-d925-4b2a-af5d-c1216f07036d%40gmail.com.