Skip to content
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

Content-type in Resource Timing #88

Closed
abinpaul1 opened this issue Nov 14, 2022 · 6 comments
Closed

Content-type in Resource Timing #88

abinpaul1 opened this issue Nov 14, 2022 · 6 comments
Assignees
Labels
concerns: privacy This proposal may cause privacy risk if implemented from: Google Proposed, edited, or co-edited by Google. position: support topic: performance venue: WHATWG Fetch Workstream

Comments

@abinpaul1
Copy link

Request for position on an emerging web specification

Information about the spec

Design reviews and vendor positions

Bugs tracking this feature

Anything else we need to know

Link to entry on the Chrome Platform Status: https://chromestatus.com/feature/5156068351541248

@annevk
Copy link
Contributor

annevk commented Nov 14, 2022

I've been reviewing whatwg/fetch#1481 and from that perspective this seems like a reasonable addition. For revealing the (parsed value of the) Content-Type header it sticks to CORS for subresources and same-origin (including redirects) for navigation and as such seems like it will mainly help make it easier to categorize timing entries.

@achristensen07
Copy link

Could we restrict the allowed revealed content types to the values of Request.destination? That would prevent unique identifiers from being included in the strings.

@annevk
Copy link
Contributor

annevk commented Nov 16, 2022

Can't they already communicate unique identifiers to the requesting origin if they so desire?

@annevk annevk added the concerns: privacy This proposal may cause privacy risk if implemented label Apr 27, 2023
@annevk
Copy link
Contributor

annevk commented Apr 27, 2023

Apologies for the delay here. I wanted to circle back with Alex when the various PRs got more concrete, but life happened.

We're supportive of this feature, but would like to see two changes to prevent passive leakage of data as this header is not otherwise broadcasted when embedding images, scripts, etc.:

  • Restricting what we return to the MIME type's essence.
  • Filtering the MIME type's essence to only return MIME types the browser supports, as well as deduplicating when MIME types mean the same thing (e.g., JavaScript MIME types).

I would be willing to set up the infrastructure for this in MIME Sniffing so you can pass an algorithm there a MIME type and get a filtered one back. (My tentative thinking is that it would do some deduplication for JSON/XML/JS and then fallback to https://mimesniff.spec.whatwg.org/#supported-by-the-user-agent which while not great, is probably good enough until we're happy to just write out the full list.)

Does that seem reasonable @abinpaul1 @yoavweiss?

@yoavweiss
Copy link

That works for me, thank you!! :)

annevk added a commit to whatwg/mimesniff that referenced this issue Apr 27, 2023
annevk added a commit to whatwg/mimesniff that referenced this issue May 4, 2023
@annevk
Copy link
Contributor

annevk commented May 8, 2023

I should have done this earlier, but let's label this as "position: support" one week from now given our feedback has been taken into account. Thanks @yoavweiss and @abinpaul1 for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concerns: privacy This proposal may cause privacy risk if implemented from: Google Proposed, edited, or co-edited by Google. position: support topic: performance venue: WHATWG Fetch Workstream
Development

No branches or pull requests

5 participants