ServiceWorkerAutoPreload is a mode where the browser issues the network request in parallel with the service worker bootstrap, and consumes the network request result inside the fetch handler if the fetch handler returns the response with `respondWith()`. If the fetch handler result is fallback, it passes the network response directly to the browser. ServiceWorkerAutoPreload is defined as an optional browser optimization, which will change the existing service worker behavior. We expect the impact on Enterprise is low, but the temporary enterprise policy called ServiceWorkerAutoPreloadEnabled will be added to control this feature.
For compatibility risks, the main concern was about how this feature works with the navigation preload API. But we don't think this feature introduces major compatibility issues because this feature respects the navigation preload API, and is not exposed when the navigation preload API is already enabled. The only cost is the server side cost to respond to the network requests, which may not be used if the fetch handler returns a result from the disk cache. This cost can be reduced by applying the feature only when the service worker is not started, or only for websites that meet some criteria e.g. fetch handler always fallback to the network.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
We have a plan to show some info when the preload requests by this feature are triggered on DevTools. It's tracked in crbug.com/344912796
Currently we don't have WPT tests. As this feature is only exposed with heuristics and it doesn't have an API surface, it's not testable on the WPT infrastructure.
Shipping on desktop | 140 |
Origin trial desktop first | 131 |
Origin trial desktop last | 136 |
DevTrial on desktop | 126 |
Shipping on Android | 140 |
Origin trial Android first | 131 |
Origin trial Android last | 136 |
DevTrial on Android | 126 |
Shipping on WebView | 140 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
None
You don't often get email from sisid...@chromium.org.
Learn why this is important
|
This looks like a nice optimization.
> Specification
What needs to happen for this PR to land? It looks like there are a couple minor things from 2 weeks ago that need to be addressed. Since the WebKit reviewer has now approved, could it be landed after that?
Regarding a site's eligibility for the feature -- could you clarify the criteria you plan to ship with? The explainer section at https://github.com/WICG/service-worker-auto-preload?tab=readme-ov-file#eligibility-criteria seems to have been written before the experiment, so I'm curious as to whether your thinking on that is still the same.
2025年7月25日(金) 10:44 'Daniel Clark' via blink-dev <blin...@chromium.org>:This looks like a nice optimization.
> Specification
What needs to happen for this PR to land? It looks like there are a couple minor things from 2 weeks ago that need to be addressed. Since the WebKit reviewer has now approved, could it be landed after that?I am a reviewer of the PR, and the remaining part is addressing comments there.
Regarding a site's eligibility for the feature -- could you clarify the criteria you plan to ship with? The explainer section at https://github.com/WICG/service-worker-auto-preload?tab=readme-ov-file#eligibility-criteria seems to have been written before the experiment, so I'm curious as to whether your thinking on that is still the same.Upon the PR, there are no additional criteria needed. Network requests may always be sent if the feature is not explicitly disabled.I hope @Shunya Shishido to explain the details.
Also, point (1) there is not so clear :"Higher rates of fetch handler results are fallback." Is there a specific rate you have in mind, and how is that determined?
Have you talked to the WebKit folks to see what eligibility criteria they plan to use for their version of the feature?
On Fri, Jul 25, 2025 at 2:37 PM Yoshisato Yanagisawa <yyana...@chromium.org> wrote:2025年7月25日(金) 10:44 'Daniel Clark' via blink-dev <blin...@chromium.org>:This looks like a nice optimization.
> Specification
What needs to happen for this PR to land? It looks like there are a couple minor things from 2 weeks ago that need to be addressed. Since the WebKit reviewer has now approved, could it be landed after that?I am a reviewer of the PR, and the remaining part is addressing comments there.Comments were resolved, I believe now it's ready to be landed.
LGTM3
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/51e15df7-ec66-4ad2-bb08-e69768444516n%40chromium.org.