-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider supporting Fetch Metadata. #885
Comments
What's the expected interaction with service workers? Should service workers see these values exposed in two different places? Also, if you decide to expose the headers to service workers, you can get in a situation where it appears as if the headers values are preserved, but then when the fetch is made from the service worker, the values get overridden by the fetch algorithm. |
I'm imagining that these headers would be set in main fetch, before we hit the service worker. I could also easily live with the headers being set in HTTP-network-or-cache fetch, after we run through the service worker. Either way, I'm a bit confused about the expectations for fetches from Service Workers, as my mental model matches what you suggest above ("the values get overridden by the fetch algorithm"), but I've also heard suggestions that " @jakearchibald and @arturjanc have been discussing this in more detail over the last few days, and might have thoughts to share. |
It's not the same and cannot be. We aim for it mostly being the same (and that it never throws) so developers can use that kind of pattern safely. |
This patch integrates Fetch Metadata processing into Fetch's "main fetch" algorithm, and defines a "user activation flag" on requests that will be populated during HTML's "process a navigate fetch" algorithm. Closes #885.
https://mikewest.github.io/sec-metadata/ is starting to look pretty reasonable. I plan to put up some PRs to sketch out what the integration would look like, based on the thoughts in https://mikewest.github.io/sec-metadata/#fetch-integration. I think we'd need ~3 changes, but who knows? :)
Add a boolean
user activation
flag torequest
objects, defaulting tofalse
. We'd set it in HTML's navigation algorithm, based on whether the navigation was triggered by user activation.Call set the Fetch Metadata headers for a request. Probably from "main fetch"?
Define "
nested-navigate
", as per Consider splittingdocument
intodocument
andnested-document
. #755.WDYT?
The text was updated successfully, but these errors were encountered: