w3ctag / design-reviews

W3C specs and API reviews
Creative Commons Zero v1.0 Universal
332 stars 56 forks source link

Review request for HTTP Status Code in Resource Timing #757

Closed abinpaul1 closed 2 years ago

abinpaul1 commented 2 years ago

Wotcher TAG!

I'm requesting a TAG review of HTTP Status Code in Resource Timing.

Adds a field responseStatusCode to PerfomanceResourceTiming which holds an integer corresponding to HTTP status code returned when fetching the resource.

Further details:

You should also know that...

We'd prefer the TAG provide feedback as :

💬 leave review feedback as a comment in this issue and @-notify @abinpaul1 @yoavweiss

domenic commented 2 years ago

I suggest using responseStatus instead of responseStatusCode to better match Fetch's response.status property name.

hober commented 2 years ago

It would be good to get @mikewest & @annevk's eyes on this.

ylafon commented 2 years ago

This is the kind of information that developers asked since quite a long time, if security and fetch people think that it is done in a way that doesn't enable security risks, then it looks like a valid addition, but iirc, previous attempts failed in the past.

mikewest commented 2 years ago

The explainer suggests that "The status code is behind CORS check", which would alleviate my concerns. That's the same check we use for the status and statusText members of Response objects through the Fetch API, and doesn't seem unreasonable to extend to timing APIs.

annevk commented 2 years ago

Yeah, as long as you don't go beyond the normal same-origin policy and its CORS extension in terms of information exposure it ought to be fine. (I vaguely recall prior attempts wanting to expose it all the time, which would be problematic.)

maxpassion commented 2 years ago

Hi @abinpaul1 , we had a discussion in today's TAG meeting and are generally happy with this proposal. Thanks @mikewest @annevk for helping with the review.