w3ctag / design-reviews

W3C specs and API reviews
Creative Commons Zero v1.0 Universal
328 stars 55 forks source link

ServiceWorkerAutoPreload #963

Closed sisidovski closed 3 months ago

sisidovski commented 3 months ago

こんにちは TAG-さん!

I'm requesting a TAG review of ServiceWorkerAutoPreload .

ServiceWorker fetch handlers are used for various reasons but there are many cases where developers use them with the intention of serving resources faster than the network, however in some cases ServiceWorker could be slower because of its startup. To fulfill their intention, this document proposes the introduction of “ServiceWorkerAutoPreload”, a new loading strategy for ServiceWorker. ServiceWorkerAutoPreload is a mode where the browser issues a network request (i.e. a regular request which may result in a HTTP cache hit or an actual fetch) in parallel with the ServiceWorker bootstrap, and consumes the network request result inside the fetch handler.

Further details:

martinthomson commented 3 months ago

Hi @sisidovski, the TAG just took a brief look at this and - on the surface - this looks pretty reasonable. However, as a personal proposal (backed by Google or not), it is a little early to be seeking TAG feedback. We encourage you to take this to the Service Workers Working Group, just as you identified, and discuss it further there.