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

Image Accept: headers in the spec prevent conneg #877

Closed
wolfbeast opened this issue Mar 7, 2019 · 6 comments
Closed

Image Accept: headers in the spec prevent conneg #877

wolfbeast opened this issue Mar 7, 2019 · 6 comments

Comments

@wolfbeast
Copy link

wolfbeast commented Mar 7, 2019

The fetch spec pretty much mandates that everyone uses:
image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5 for image requests.
This should be adapted to give user agents the possibility to include image formats that might not be universally accepted but preferred, e.g. image/webp or image/apng or image/jxr, and to exclude formats that might not be supported or preferred (e.g. excluding svg support for agents on systems where vector graphics are disproportionately expensive to process), to allow server-driven conneg to happen with servers that support multiple other formats.

As it stands, the spec doesn't allow for this kind of required flexibility, and users agents would not be spec compliant if they indicate their capabilities to servers.

@annevk
Copy link
Member

annevk commented Mar 7, 2019

This is #274, no?

@wolfbeast
Copy link
Author

wolfbeast commented Mar 7, 2019

Hmm I didn't think that issue describes the exact problem, but to be fair I didn't read every single comment. There is no confusion, after all, but the enforced headers don't provide needed flexibility, and imply support for and preference for certain formats (png and svg) that might not be realistic.

@annevk annevk closed this as completed Oct 23, 2019
@annevk
Copy link
Member

annevk commented Oct 24, 2019

It's a duplicate of the aforementioned issue.

@bathos
Copy link

bathos commented Sep 17, 2023

Just a note for others who may land here in the future:

If you’re here due to being puzzled by the seemingly “hard-coded” per-destination accept header values, and perhaps have remained puzzled even after following the link to the duplicate (which acknowledges the confusion, but may not immediately dispel it): the key “ohhhh” thing you (and me until, a moment ago) are likely missing is one thread link deeper, here:

Well, it already says "should" so user agents have some leeway [...]

In other words, because the verb is “should,” Fetch isn’t really preventing agents from setting other values (or none) and agents that currently send other values (which I think is all of em, in practice?) are compliant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants
@annevk @wolfbeast @bathos and others