-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
What should be the referrer when fetching imported module scripts? #1150
Comments
I don't think I care very much, but |
I think it should be |
OK, makes sense. I would like to get #1149 merged before working on this if possible. |
As discussed in #1122, #1111, and in w3c/ServiceWorker#889 (comment), a number of problems are caused by the current setup of using the settings object of the worker itself as the fetch client. Instead, we use the incumbent settings object to do the fetching. (Incumbent, instead of e.g. current, because almost everything else in the (Shared)Worker constructors uses the incumbent settings object.) Notably, for fetching module script trees, this necessitates separating the fetch client settings object from the one used for the module map. This fixes #1111 since now module workers are fetched with the correct client, and thus automatically get the correct referrer. Dependencies, however, require further work which will happen as part of #1150.
Given
should the referrer that the server sees when fetching
b.js
bex.html
, ora.js
?The spec currently says
x.html
because that was easier to spec.The only relevant precedent I can see is
importScripts
, which always uses the top-level worker URL, even in the case ofimportScripts
-ing a script that alsoimportScripts
another script.I don't have any strong opinion. @ajklein @jonco3 @Constellation @DigiTec?
The text was updated successfully, but these errors were encountered: