-
Notifications
You must be signed in to change notification settings - Fork 332
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
Accept headers in spec cause confusion #274
Comments
Relevant part of the spec is 5 Fetching. See also this mozilla bug, which moved them to |
Yeah, some of that bug should probably become a "Background reading" section. No objections from me to further clarifying this. And I guess we should update image to be |
To me the right framework seems to be mandating |
Ideally they are added just like other features I think, but IPR complicates media formats tremendously. So maybe that's a reasonable way to go. |
Agreed! I do remember seeing on the chromium bug someone stating "the spec shouldn't define Very Postel's Law. Worked for TCP :-) @annevk can you clarify "they"? Not sure of context. |
FWIW - |
Thanks for the clarification @mnot! 🙏 Also been meaning to ask for a while now but didn't know the place as the context is spread between WHATWG & W3C and all places in between. Regards to preloading (therefore fetch destinations) Am curious of This has been a concern for me in keeping MDN docs up to date as am noticing documentation is already starting to send out (potentially) incorrect information and there are links from the documentation back to here for "a bit more detail".
"correct" is the word that concerns me and who defines it. Please forgive me if this is a vendor specific topic similar to Thanks in advance to whoever has information! I feel this is a relative place to ask. Please direct me elsewhere if this is not the place. Wanted to spare yet another issue. This as been a mystery to me for months since the feature is broken at the vendor I use to test. |
@snuggs - "correct" in the documentation most likely refers to the fact that the browser is aware of the Request.destination for the resource it is fetching and therefore can adapt the If you think some browsers are not sending the right |
Hmmm @yoavweiss not certain i'm versed well enough on this topic to even give feedback. Still fairly new here. I do realize we push back on things conneg-y. However I feel much of the pain (and failure) in the past was much to do with conversations like this not being had during implementations (or being had behind respective vendor closed mail threads). Much has changed since then and specs (usually) are sound. It's the unclear assumption during implementation is the loading of the magazine in said footgun IMHO. The WPT does help with these assumptions today but I could not find relevant tests there (i've checked). Perhaps this is less of a deal than I think this is. You all would know better. However during this transition to a more collaborative web I'm learning (from @domenic) That's just the way we've done things around here. Is ok to question from time to time. As long as the question doesn't break the web of course. 😄 That's the part i'm still figuring out. Is this even a concern @yoavweiss or are there better fish to fry? Thanks for the feedback and your time. |
@snuggs - apologies if my reply came across as overly-negative. That wasn't my intention.
I don't know that this is still true in general. It certainly isn't true for my specific case. And we have been pushing improved content negotiation solutions in the last few years.
I'm not sure what you're referring to by "this". IMO, "correct" and useful Accept headers are certainly something worth investing time and thought in. I don't think we need to specify what the value of those headers is for all request destinations, because support varies between different browsers and implementations. Therefore I believe the spec needs to give implementations the liberty (and guidance) to do what's right. Unlike today, where implementations need to ignore a SHOULD in order to truly advertise their support for non-universal file formats. Regarding |
I feel a ton better about my thoughts on the matter. Wish I would have seen that years ago.
To be clear I have no issue with
Navigating to a url seems to give a consistent
My use case is am currently preloading some html. Due to P.S. ** note to self ** Use this, that, it, etc. less on Github. * This * (pun intended) is the second time someone mentioned to me. :-) |
@yoavweiss I think I found what/where i've been looking for: https://fetch.spec.whatwg.org/#fetching Step 3.3
Is this list not exhaustive? Should the spec include |
But otherwise, the list is not exhaustive. This issue is about making sure that this list enables user agents to maintain useful |
@yoavweiss Just an update from a question I asked you earlier about Thanks for your help. |
So I looked at this again, for the
And Fetch still has I guess we can say something about using |
As long as different user agents support different file formats it doesn't make sense to align here. What Fetch could do is provide general guidance about how UAs should construct their That is, unless we want to define precise processing ("if webp is supported, apng is supported, and video formats in image contexts are not supported, return ...." kind of definition). Does that make sense? |
I'm not sure, Chrome expanding the |
From #877
As it stands, the spec doesn't allow for this kind of required flexibility, since it creates the expectation that all user agent should align, and users agents would not be spec compliant if they indicate their capabilities to servers which is in many situations desired. What's the point of the Accept headers if you're not actually allowed to use them for what they are for? |
Speaking only for myself (haven't asked around yet), I think it may make sense to define what At the same time, I wouldn't want Safari to "align" their P.S. On the cited issue, I'd argue that Firefox should add webp support to its navigation |
Negotiation of image documents is not what it is being used for. The issues Firefox hits are because sites are using the |
That's not a problem with the spec. Mandating certain fixed strings in the spec to passive-aggressively force website owners to use other methods for browser detection (which is what you're saying, IIUC) is the wrong approach to this problem, especially if you're breaking valid content negotiation mechanisms in the process. |
During recent Chrome patch discussions, concerns were raised that Chrome's
Accept
headers are not spec compliant, as they include MIME types supported by Chrome but not supported universally. While that's not the case, it required explanations as to why our current implementation is as it should be. I think a note in the spec would go a long way to prevent similar cases in the future.This was raised in the past, but was concluded as unnecessary. I agree with past arguments that current spec language permits UAs to extend the
Accept
header, but stating it explicitly, saying that user agents may (or even should) extend the spec's values with MIME types they support, would be helpful./cc @igrigorik
The text was updated successfully, but these errors were encountered: