-
Notifications
You must be signed in to change notification settings - Fork 337
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
Generic Accept header value */* and Service Workers #634
Comments
Accept
header value */*
and Service Workers
Does |
Currently https://fetch.spec.whatwg.org/#concept-fetch recommends a particular |
Note, we send / for image requests, but not we get some other accept headers wrong. I have this bug open to align with the spec: |
I guess |
@tomayac please don't worry about asking questions. They're essential. (If we keep getting certain questions a lot, that's probably a reason to start writing some documentation.) I think the main takeaway here is that browsers need to fix various issues. An active thing that you or someone else could take up is to ensure there is web-platform-tests test coverage and appropriate browser bugs are filed (and maybe linked from this issue for completeness). I don't think anything here warrants a change to the standard right now. |
Thanks for the kind words, @annevk! Looking for bugs to track, so far I found two:
There doesn't seem to be anything yet for Edge or WebKit, but I might just not be digging deeply enough. Anyone aware of bugs there, or for other browsers? |
FWIW, I think destination implementation has been slow for a couple reasons:
Anyway, I'll see if we can bump up the priority of the firefox implementation. It probably won't be immediate, but maybe we can do it in Q1 of 2018. |
Looks better with the experimental branches: https://wpt.fyi/results/fetch/api/request/destination?label=experimental Firefox support will ship in stable 61 next week, I believe. |
Hi everyone. I'm not seeking advice or any solution for my current issue, but my use case might help motivate (if needed) implementation of I've got the issue of resources loaded via a Service Worker that have a The reason is Cloudinary's Fetch API allows me to convert an animated GIF to a video with parameters in the middle of the URL, but the URL's end is the source GIF file. Details in my recent blog post: Using Cloudinary’s Fetch API to convert an animated GIF to a video.
I used to filter URLs with the images extensions (because of the generic I added a test for the presence of
Update: I see only green "PASS" on the "Check destination attribute" row in these WPT results, but when I try this test (thanks @yoavweiss for the link) in my Safari 11.1.2, it fails. |
Given there's tests and various browser bugs I'm going to close this. If there's something I missed though please let me know. |
Note, @bakulf also recently fixed the firefox accept header bug: |
Generic
Accept
headers like, for example,*/*
for images in Firefox make dealing with such requests in a Service Worker context hard and encourage relying on file extension sniffing, especially as there is no consistency among how browsers deal with setting this value.This issue is somewhat related to #521 for dynamically created
Request
s , but also covers static fetches coming fromimg
,script
,link
, etc.@wanderview suggested to open an Issue with Fetch in order to discuss this.
The text was updated successfully, but these errors were encountered: