w3c / resource-timing

Resource Timing
https://w3c.github.io/resource-timing/
Other
121 stars 35 forks source link

Use FETCH#URL to describe the name of a request #257

Closed noamr closed 3 years ago

noamr commented 3 years ago

Instead of specifying here that it's the URL before redirects, which is essentially the same thing.

Closes https://github.com/w3c/resource-timing/issues/244


Preview | Diff

annevk commented 3 years ago

I'm not sure what "resource" is, but I suspect it's a response. Assuming I'm right, I think you want to get data from the response and not assume that the response has access to the request.

yoavweiss commented 3 years ago

I'm not sure what "resource" is

There's a plan to clarify that as part of https://github.com/w3c/resource-timing/issues/252, but I don't know we have a full design for that just yet.

I suspect it's a response. Assuming I'm right, I think you want to get data from the response and not assume that the response has access to the request.

Would it make sense then to grab the first item from [https://fetch.spec.whatwg.org/#concept-response-url-list](Response's URL list)?

annevk commented 3 years ago

Yeah, probably, if you can be certain it's non-empty (i.e., you do not access it when fetch hasn't returned it yet).

noamr commented 3 years ago

I'm not sure what "resource" is

There's a plan to clarify that as part of #252, but I don't know we have a full design for that just yet.

It might be good to start from #252 then, it would clarify a lot of these issues, as the request/response etc will probably be a parameter passed from FETCH at a particular point in time.