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

Match the mime type of the search suggestions example to the Suggestions extension specification. #1

Closed
wants to merge 1 commit into from

Conversation

Standard8
Copy link

Currently the MIME type of the search suggestions example in the URL element section gives a MIME type of "application/json".

It would be better if this was "application/x-suggestions+json" as that would match the Suggestions extension.

Reported by feluchs via https://bugzilla.mozilla.org/show_bug.cgi?id=1425827

@dewitt
Copy link
Owner

dewitt commented Apr 23, 2018

Thanks for the pull request! I'm inclined to merge it, but let's have the discussion here first, just to make sure we cover everything.

Obviously this one is tricky, since the examples and specs should match the browser's real-world behavior ("application/x-suggestions+json"), but I believe most people would now say that "application/json" is more correct (RFC 7159), since people don't seem to be sub-mimetyping JSON payloads. (Back then, who knew where things were going to head.)

In fact, it might be that the only place "application/x-suggestions+json" is used is the OpenSearch suggestions extension spec. Indeed, a Google search seems to confirm that.

Also, it would be a breaking change, presumably putting existing code out of recommendation with the existing, 12-year-old main spec (but in compliance with the equally-old extension's spec). Probably not a huge deal, but worth noting.

As a way of splitting the difference, do you think there any chance Firefox would be able to accept both types? In which case, maybe we should revise the Suggestions extension spec to use "application/json", and add a comment about the historical way of doing things.

If Firefox can't change (and I'm not suggesting I expect it to, since this is probably long dormant code there, too) then it might be better to go forward with this patch after all.

Did I get anything wrong in that summary? Thoughts about how to proceed?

@dewitt dewitt self-assigned this Apr 23, 2018
@Standard8
Copy link
Author

Sorry for the delay in responding. Just a quick update, we're currently discussing the possibility of supporting both MIME types. I'll update again when we know more.

@Standard8
Copy link
Author

We've posted an intent to ship: https://groups.google.com/forum/#!topic/mozilla.dev.platform/mlNx35Xjw0U for FF 63. We'll give it a few days for feedback, then look at adding it to nightly builds.

@Standard8
Copy link
Author

This has now been added to Firefox 63 (it'll appear in beta in a few days): https://bugzilla.mozilla.org/show_bug.cgi?id=1425827

So we don't need this PR now, though at some stage it'd be nice to tidy up the suggestions extension to clarify the allowed types.

@Standard8 Standard8 closed this Sep 3, 2018
@Standard8 Standard8 deleted the suggestions branch September 3, 2018 08:08
dewitt pushed a commit that referenced this pull request Oct 22, 2020
Update to latest draft
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants