Closed Bug 1507691 Opened 6 years ago Closed 6 years ago

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

Categories

(Core :: Graphics: ImageLib, enhancement, P3)

Desktop
Unspecified
enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: tetsuharu, Assigned: aosmond)

References

Details

(Keywords: dev-doc-complete, parity-chrome)

Attachments

(1 file)

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
This should have done that just yesterday:

https://hg.mozilla.org/mozilla-central/rev/f8fefc9626c1
Priority: -- → P3
I see now; I updated the Accept header for image requests, but you are suggesting it be provided for on all pages.
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: nobody → aosmond
Status: NEW → ASSIGNED
Pushed by aosmond@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/243ce783ccfb
Add image/webp to default HTTP Accept header. r=dragana
Keywords: dev-doc-needed
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
https://hg.mozilla.org/mozilla-central/rev/243ce783ccfb
https://hg.mozilla.org/mozilla-central/rev/3fee9c5dc2c2
Status: ASSIGNED → RESOLVED
Closed: 6 years 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?

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?

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

(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!

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.

Attachment

General

Created:
Updated:
Size: