You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Speculation Rules API is designed to improve performance for future navigations. It targets document URLs rather than specific resource files, and so makes sense for multi-page applications (MPAs) rather than single-page applications (SPAs).
The Speculation Rules API provides an alternative to the widely-available feature. It provides many improvements over these technologies, along with a more expressive, configurable syntax for specifying which documents should be prefetched or prerendered.
Reacted by Arif, mdh, Domenic Denicola, Westbrook Johnson, G. Luke Mendelman-Haenn, Ryan Townsend, Mark Hoad, Bruce B. Anderson, Mario Hamann, Barry Pollard and 20 more
If the parties involved don't want to accept everything into Interop 2025, I think accepting speculation rules + prefetching (omitting prerendering) would be a good compromise. As of October 1, speculation rules prefetch is used on ~12% of page loads, and this number is likely to go up a good chunk more as Cloudflare's Speed Brain deployment continues. Speculation rules prerender, although it's more dramatic and certainly well-loved among web developers, isn't seeing as-high adoption numbers. And working prefetch this year would be good groundwork if browsers wanted to tackle prerender the next year.
@domenic I agree prefetch-only is a really good compromise on scope but one thought on this: would it be wise for them to treat prerender rules asif they were declared as prefetch?
In my view, prerender is a stronger signal that a URL/href will be the next page (I know we have eagerness for that too) so they could depend on effectively downgrading prerender where it's not supported.
If browsers weren't to do this, then we'll end up having to conditionally serve Speculation Rules to different browsers (possibly needing UA sniffing?), which is far from ideal.
I agree that treating prerender as prefetch is reasonable. We've thought of doing that at times in Chromium (e.g. if limits are hit), but haven't as of yet.
Thank you for proposing Speculation Rules API for inclusion in Interop 2025.
We wanted to let you know that this proposal was not selected to be part of Interop this year.
On behalf of the entire Interop team, thank you for submitting this proposal for consideration. We got many more proposals than we could include in this year's project, necessitating some difficult choices. Please note this should not be taken as a comment on the technology as a whole, or our willingness to consider it for Interop in the future. We appreciate the work you put into your proposal, and would welcome your participation in future rounds of Interop.
For an overview of our process, see proposal selection. Thank you again for contributing to Interop 2025.
Activity
domenic commentedon Oct 7, 2024
Oh, very cool to see this posted.
As one of the spec maintainers and Chromium engineers on this feature, I think it's important to emphasize that speculation rules is a surface API that triggers (as of now) two larger features: prefetching, or prerendering. Those are specified in https://wicg.github.io/nav-speculation/prefetch.html and https://wicg.github.io/nav-speculation/prerendering.html. So just implementing the speculation rules spec by itself doesn't help; you'd need to implement one or both of those.
If the parties involved don't want to accept everything into Interop 2025, I think accepting speculation rules + prefetching (omitting prerendering) would be a good compromise. As of October 1, speculation rules prefetch is used on ~12% of page loads, and this number is likely to go up a good chunk more as Cloudflare's Speed Brain deployment continues. Speculation rules prerender, although it's more dramatic and certainly well-loved among web developers, isn't seeing as-high adoption numbers. And working prefetch this year would be good groundwork if browsers wanted to tackle prerender the next year.
ryantownsend commentedon Oct 7, 2024
@domenic I agree prefetch-only is a really good compromise on scope but one thought on this: would it be wise for them to treat prerender rules asif they were declared as prefetch?
In my view, prerender is a stronger signal that a URL/href will be the next page (I know we have eagerness for that too) so they could depend on effectively downgrading prerender where it's not supported.
If browsers weren't to do this, then we'll end up having to conditionally serve Speculation Rules to different browsers (possibly needing UA sniffing?), which is far from ideal.
domenic commentedon Oct 8, 2024
I agree that treating prerender as prefetch is reasonable. We've thought of doing that at times in Chromium (e.g. if limits are hit), but haven't as of yet.
wpt-interop commentedon Feb 13, 2025
Thank you for proposing Speculation Rules API for inclusion in Interop 2025.
We wanted to let you know that this proposal was not selected to be part of Interop this year.
On behalf of the entire Interop team, thank you for submitting this proposal for consideration. We got many more proposals than we could include in this year's project, necessitating some difficult choices. Please note this should not be taken as a comment on the technology as a whole, or our willingness to consider it for Interop in the future. We appreciate the work you put into your proposal, and would welcome your participation in future rounds of Interop.
For an overview of our process, see proposal selection. Thank you again for contributing to Interop 2025.
Posted on behalf of the Interop team.