Update HTTPFetch algorithm to support new SW Handle Fetch returns #1832
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will update the HttpFetch algorithm, particularly the handling of the response for Service Worker fetch (
handle fetch
step). Currently, the response of handle fetch step is assumed to return theresponse
type (or null, if the ServiceWorker couldn't handle the fetch and need to fallback to the network request). However, we have changed thehandle fetch
step to also returnservice worker timing info
when the ServiceWorker static routing API used, so that the corresponding timing information are correctly exposed when the ServiceWorker could not handle the fetch. To support this new return type, we need to update the handling of the response ofhandle fetch
.To expose the Service Worker Timing Info to the resource timing API, we also associate them to the Fetch Timing Info so that it could be later referenced.
(See WHATWG Working Mode: Changes for more details.)
Preview | Diff