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

Issue with "Trailer": page says all browsers are compatible but there is no way to use this feature #7137

Closed
Tracked by #25141
nickform-ost opened this issue Jul 21, 2021 · 7 comments
Labels
Content:HTTP HTTP docs help wanted If you know something about this topic, we would love your help!

Comments

@nickform-ost
Copy link

MDN URL: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Trailer

What information was incorrect, unhelpful, or incomplete?

The page says that Trailers are available for use in all major browsers. In fact, it seems it there is no way to use them from javascript.

Specific section or headline?

"Browser compatibility" is the main culprit but also, given the information in this SO answer, I'm a little lost as to why this page exists at all.

What did you expect to see?

Maybe a thumbs down icon with a deprecation warning. I may be missing something.

Did you test this? If so, how?

We implemented the server side of this, encouraged by this page. Now we come to depend on that from the client side we find we can't use it from the browser (neither fetch nor XMPHttpRequest) despite wall-to-wall green in the browswer compatibility table. I'd really like to understand the disconnect here (may of course be my own understanding) but in any case, I would encourage some kind of health warning on the page if possible for future visitors.

MDN Content page report details
@nickform-ost nickform-ost changed the title Issue with "Trailer": (short summary here please) Issue with "Trailer": page says all browsers are compatible but there is no way to use this feature Jul 21, 2021
@nickform-ost
Copy link
Author

Just to say, I'm incredibly grateful for MDN in general and though I've been burned a bit here, I'm well ahead in hours saved by this wonderful resource so thank you to all the maintainers.

@sideshowbarker
Copy link
Member

@mnot, can you please advise on what at this point we should be saying about Trailer?

@sideshowbarker sideshowbarker added the Content:HTTP HTTP docs label Jul 21, 2021
@mnot
Copy link
Contributor

mnot commented Jul 22, 2021

There are two things going on here --

Firefox supports the Server-Timing field in trailers; I'm not aware of any other browser that does. See this issue on Fetch about making trailers available in browsers generally.

Trailer is really just a hint; there isn't any tangible what that browsers can "support" it, beyond just making it available as any other header is. Of courser, many entries in MDN state that a header is "supported" in this fashion, so I don't know that it needs to change.

However, be aware that the most recent revision of HTTP changed how headers and trailers interact -- they're now separate "buckets", and you can't just arbitrarily promote a header into a trailer, or vice versa, unless its spec says you can.

See this text. So, I think the example given needs to change.

@nickform-ost
Copy link
Author

Thanks for the comments and the useful links. I think on reflection I should have targeted this issue at the trailers directive on the TE request header page. There seems to be no way that javascript can set this directive on a request in order to tell the server to include trailers.

Given that, I am still unsure what the green on the Trailer page means - there is no way to use the feature from javascript. What test has been met in order to decide whether a browser is compatible or not?

@hamishwillee
Copy link
Collaborator

I am still unsure what the green on the Trailer page means - there is no way to use the feature from javascript. What test has been met in order to decide whether a browser is compatible or not?

No idea, but it is a general question/problem what to do about recording compatibility in BCD: mdn/browser-compat-data#12533

@Rumyra Rumyra added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Nov 25, 2021
@lidel
Copy link

lidel commented Jan 28, 2022

I wrote some ideas how to reduce confusion caused by the Trailer docs in mdn/browser-compat-data#14703 (before finding this one).

In case a drive-by reader is curious about the current state,
no major browser engine supports reading trailers via Fetch API (from JS):

@sideshowbarker sideshowbarker removed the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jan 29, 2022
@sideshowbarker sideshowbarker added the help wanted If you know something about this topic, we would love your help! label Jul 6, 2022
@bsmth
Copy link
Member

bsmth commented Nov 25, 2024

Thanks for raising this. This should be resolved in the linked PR now, so I'm closing as done. See also: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Trailer#browser_compatibility

@bsmth bsmth closed this as completed Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:HTTP HTTP docs help wanted If you know something about this topic, we would love your help!
Projects
None yet
Development

No branches or pull requests

7 participants