This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
var r = new Request(...); // Set's internal request's referrer to client by default. r.referrer = ? Currently it resolves to the empty string since the request's internal URL is an empty string, but that seems like an implementation detail and the specific case should be defined in the spec.
So it seems /client/ is what we want, so that when the fetch is done, we take the policy into account as it stands at that point. It might be somewhat weird that request's referrer returns the empty string in that case, and not when you get it in a FetchEvent in a service worker, but perhaps that is fine.
Normalizing to the empty string seems somewhat confusing, since you might think the referrer will be omitted but it won't. Alternatives: A) We set it directly to the URL associated with the global. Then when it passes through fetch it will get normalized. B) Like A) but we normalize it directly too. (And then when fetch happens it might get normalized again.) C) We serialize a special value "about:client", that indicates this is done later.
Or D) of course, we just serialize to the empty string and don't consider it super problematic.
I think this has to be C or D, leaning towards C since it's rather trivial either way.
https://github.com/whatwg/fetch/commit/30c35ec10994d0005f45879778424e8fc7272bde