Skip to content

Conversation

@tunetheweb
Copy link
Contributor

@tunetheweb tunetheweb commented Sep 19, 2025

Summary

Misc updates to the Speculation Rules BCD data, including:

  • This IS on standard tracks and is being merged into the relevant specs (see Add speculation rules prefetch whatwg/html#11426)
  • Added implementation bugs for Firefox and Safari.
  • Prefetch has always been supported on Chrome for WebViews but incorrectly marked as not in some cases.
  • Prerender has separate spec (for now) and not supported on WebViews (added implementation reference).

Test results and supporting details

See these spec PRs:

Related issues

@github-actions github-actions bot added data:http Compat data for HTTP features. https://developer.mozilla.org/docs/Web/HTTP data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API data:html Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML size:l [PR only] 101-1000 LoC changed labels Sep 19, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 19, 2025

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

@tunetheweb
Copy link
Contributor Author

@domenic @nhiroki could you confirm you agree with these updates?

"status": {
"experimental": true,
"standard_track": false,
"standard_track": true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we point to a spec where inline-speculation-rules is explicitly mentioned? If not, let's set this back to false for now:

Suggested change
"standard_track": true,
"standard_track": false,

Copy link
Contributor Author

@tunetheweb tunetheweb Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So there's a PR open for that but not merged yet (hence why I didn't add the spec URL yet):
w3c/webappsec-csp#776
They were in the old prefetch spec (which has since mostly been moved to HTML except for this piece).

So it was standard track in WICG, but is now moving to the actual, non-WICG standards (so also standard track) but is kind of in an in between state for now, but don't think that makes it non-standard. WDYT?

Happy to update this with the spec url once it is merged to CSP spec btw.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming that the PR will be merged soon, and knowing that you'll be following up, we can merge as is.

In the future, when we derive the standard_track automatically, a feature is not considered standard_track until it has landed in a spec (with good standing, as indicated by browser-specs).

Copy link
Contributor Author

@tunetheweb tunetheweb Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. As i say it was in a WICG spec (which was included in browser-specs). But that spec has been closed off now as it’s being moved to the actual standards.

My read of “standards track” is it’s on track to become a standard (which this is) even if not quite a standard yet.

But I appreciate having a real spec is the only real evidence of that as a PR can be rejected.

Bad timing with this PR. I should have updated this setting when it was in the old spec really as always was on the standards track.

Anyway, thanks for the latitude!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Gotcha, we removed these spec_urls in #27755.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhhh and that’s what flipped this to non standard. I wondered as didn’t think this was marked as such in the past.

OK so all part of the fact we’re moving this!!

@tunetheweb tunetheweb requested a review from caugner September 19, 2025 10:47
"__compat": {
"description": "`expects_no_vary_search` key",
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/script/type/speculationrules#expects_no_vary_search",
"spec_url": "https://html.spec.whatwg.org/multipage/speculative-loading.html#valid-speculation-rule",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all these keys pointing to https://html.spec.whatwg.org/multipage/speculative-loading.html#valid-speculation-rule, it would be preferable to add a text fragment, as this would allow us (in the future) to detect when a feature like this disappears from the spec.

But this is not a strict requirement for now, so we can merge as is.

/cc @Elchi3

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess as long as it’s a fragment after the id I’m ok with that. Worse case it still links to the anchor o was linking to anyway. Let me add those back then.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be preferable to add a text fragment

fwiw, I prefer real ids/anchors/definitions present in the specs. Text fragments are very unstable and I currently have no implementation for validating them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I was actually suggesting text fragments combined with ID fragments:

https://html.spec.whatwg.org/multipage/speculative-loading.html#valid-speculation-rule:~:text=%2C%20%22tag%22%2C

For validation, you could just ignore the :~: part for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated now so think this is good to merge.

@nhiroki
Copy link

nhiroki commented Sep 22, 2025

LGTM, thank you!

@caugner caugner merged commit 282dded into mdn:main Sep 25, 2025
6 checks passed
@caugner
Copy link
Contributor

caugner commented Sep 25, 2025

Thanks @tunetheweb!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API data:html Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML data:http Compat data for HTTP features. https://developer.mozilla.org/docs/Web/HTTP size:l [PR only] 101-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants