Closed Bug 1658008 Opened 4 years ago Closed 4 years ago

Add preference to control Accept HTTP header


(Firefox :: File Handling, enhancement, P5)




85 Branch
Tracking Status
firefox85 --- fixed


(Reporter: jbauman, Assigned: samson)


(Blocks 2 open bugs)



(1 file)

We already have the image.http.accept preference in about:config to control the Accept header sent in an image context, and when that is not set, the value is generated according to the image formats which are enabled (see bug 1641208), but the Accept header in a document context is hard-coded to include image/webp. Allowing more flexibility through preferences would make the behavior more consistent and pave the way for a more user-friendly UI to control this behavior as requested in bug 1644950.

There's currently higher priority work that means I won't be able to get to this for awhile, but we'd be open to accepting external contributions.

Blocks: AVIF
Priority: -- → P5

Hello, Jon is this blocker worth it to delay the AVIF deployment to Firefox?

I totally understand and agree that it should be done better.

But considering the importance of the format and that there isn't anything else for the foreseeable future coming that will make that hardcoding unmanageable shouldn't we just add it as it already is for webp?

And doing so removing the blocker for AVIF?

Hi radu.micu,

Thanks for taking an interest in AVIF!

The fact that this bug "blocks" the AVIF meta bug won't delay the deployment of AVIF. AVIF is already available in an experimental form, just not turned on by default, which is why it also wouldn't be appropriate to change the hard-coded Accept header value to include image/avif. The AVIF meta bug depends on this one as an indication of AVIF-related work that has yet to be completed. By way of comparison, the AV1 meta bug still has a number of blocking issues, but AV1 is very much deployed.

Hey Jon, Thank you for your reply. I've been following AVIF for a while and I would love to see it into FF stable also.

Apologies for my misunderstanding, when I said "deployment" I meant to be enabled by default in stable builds. Do you know when that will happen btw?

Thanks and have fun

We don't have a projected date for when AVIF will be enabled by default since the main thing standing in the way is security-related testing, but that's progressing well so far, so I think it shouldn't be too far off.

What about using same data as in Accept header (image context) in Accept header in a document context.
So something like: ACCEPT_HEADER_NAVIGATION="text/html,application/xhtml+xml,application/xml;q=0.9,"+ImageAcceptHeader+"/;q=0.8"

Flags: needinfo?(jbauman)

That's an interesting idea, sagudev. I'd be open to considering that as a separate bug, but I think it would still make sense to be able to fully override our general Accept header in a document context via a preference in a similar way that we allow overriding our Accept header in an image context. Sometimes it might be useful to make changes to that header that have nothing to do with images.

If you want to file a separate issue for your idea, and even submit a patch for it, please feel free.

Flags: needinfo?(jbauman)
Assignee: nobody → samo.golez
Pushed by
Add preference to control Accept HTTP header and genarate header based on image Accept header. r=jbauman,necko-reviewers,valentin
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
See Also: → 1680764
You need to log in before you can comment on or make changes to this bug.