Firefox does not include image/webp to HTTP Request's 'Accept' Header for html file

RESOLVED FIXED in Firefox 65

Status

()

enhancement
P3
normal
RESOLVED FIXED
6 months ago
2 months ago

People

(Reporter: tetsuharu, Assigned: aosmond)

Tracking

({dev-doc-needed, parity-chrome})

Trunk
mozilla65
Desktop
Unspecified
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox65 fixed)

Details

Attachments

(1 attachment)

Firefox does not include image/webp to HTTP Request's 'Accept' Header for html file

## Actual Result

These are values of HTTP Request's Accept Header  sent from all useragents supporting WebP


### Firefox, 65a1, 0051c8d339a969d80b66e6ce243091a9dbb6a319

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8


### Google Chrome, Version 72.0.3611.0 (Official Build) canary (64-bit)

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8


### Edge 44.17763.1.0 (EdgeHTML 18.17763)

Accept: text/html, application/xthml+xml, application/xml; q=0.9, */*; q=0.8


## Expected Result


Should we contain 'image/webp' for HTTP Request Header's 'Accept' field?
Depends on: WebP
Keywords: parity-chrome
Assignee

Comment 1

6 months ago
This should have done that just yesterday:

https://hg.mozilla.org/mozilla-central/rev/f8fefc9626c1
Priority: -- → P3
Assignee

Comment 2

6 months ago
I see now; I updated the Accept header for image requests, but you are suggesting it be provided for on all pages.

Comment 4

6 months ago
When all browsers support webp, Do we no longer need to include "image/webp" in "Accept"?
(In reply to Andrew Osmond [:aosmond] from comment #2)
> I see now; I updated the Accept header for image requests, but you are
> suggesting it be provided for on all pages.

Yes!
It would be nice for some applications which switches image format on server side by "Accept" header.
I think some applications assumes that an UA includes "image/webp" to "Accept" header to rely on Chromium's implementation. 

But I also think a webdev also workarounds this problem with <picture/> and it might be more straight way.

So this is just compatibility issue "with Chrome"... :(
(In reply to Tetsuharu OHZEKI [:tetsuharu] [UTC+9] from comment #5)
> But I also think a webdev also workarounds this problem with <picture/> and it might be more straight way.
Yeah, that and comment 1.

> So this is just compatibility issue "with Chrome"... :(
Such rare applications had to be adjusted for [Firefox and] Edge anyway, so there should be no need for this.
Assignee

Updated

6 months ago
Assignee: nobody → aosmond
Status: NEW → ASSIGNED

Comment 7

6 months ago
Pushed by aosmond@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/243ce783ccfb
Add image/webp to default HTTP Accept header. r=dragana
Assignee

Updated

6 months ago
Keywords: dev-doc-needed

Comment 8

6 months ago
Pushed by aosmond@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3fee9c5dc2c2
Followup to fix broken test expecting accept header without image/webp. r=aosmond CLOSED TREE

Comment 9

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/243ce783ccfb
https://hg.mozilla.org/mozilla-central/rev/3fee9c5dc2c2
Status: ASSIGNED → RESOLVED
Last Resolved: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Note to MDN writer's team:

I have a note to the Fx65 rel notes to cover this:
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/65#Other

I also updated the example Accept header shown on the Accept page to include image/webp, to draw more attention to this:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept

I'm not sure if we also want to record this in our browser compat data?

Comment 11

3 months ago

I'm assuming this was prompted by people wanting to "save as" images and getting different results than <img> in-page.

Shouldn't this have been solved by applying what's talked about in bug 1347958 instead of just blanket-adding this conneg header to html file requests?

Comment 12

2 months ago

Why did Firefox 66 went back to NOT sending image/webp to default HTTP Accept header?

Comment 14

2 months ago

(In reply to Jan Andre Ikenmeyer [:darkspirit] from comment #13)

See bug 1417463.

I understand this, but it does NOT solve the problem reported here.

The important part is for applications to create html (img src etc.) according to what the client is able to display.

The / does not solve this - every browser, even IE, has this in its default Accept header. Without image/webp, applications are no longer able to serve .webp to Firefox!

Comment 15

2 months ago

I am sorry, the last sentence in my previous comment was supposed to begin with
The */* does not solve this

(In reply to tgross.ms.de from comment #15)

I am sorry, the last sentence in my previous comment was supposed to begin with
The */* does not solve this

How about you use <picture/>?

You need to log in before you can comment on or make changes to this bug.