w3c / webmention

Webmention spec
https://www.w3.org/TR/webmention/
112 stars 46 forks source link

Sending webmentions - discovery - lacks interoperability #40

Closed melvincarvalho closed 8 years ago

melvincarvalho commented 8 years ago

Two methods of discovery are listed in section 3.1.1

The sender MUST fetch the target URL (and follow redirects [FETCH]) and check for an HTTP Link header [RFC5988] with a rel value of webmention, or an HTML or element with a rel value of webmention.

Namely

Not all implementations on the social web are based on HTML. Other serializations need to be handled in order to achieve interoperability with existing standards.

Suggestions

  • Move the link header to a MAY
  • Drop mention of HTML to an example, but reword the text to say that the serialization MUST link to the webmention endpoint in the body of a document, in a standards compliant way

I much prefer this link to be in the body, as not every implementor will have access to link headers, and some may wish to use mentions.

kevinmarks commented 8 years ago

This makes the spec vaguer and less useful. I've implemented webmention for SVG and PNG using link headers. While I could add an a href to an SVG, I can't see how to do that for PNG. I don't want to rewrite the svg in this case, that would be more difficult than a link header. On 23 May 2016 11:14 pm, "Melvin Carvalho" notifications@github.com wrote:

Two methods of discovery are listed in section 3.1.1

The sender MUST fetch the target URL (and follow redirects [FETCH]) and check for an HTTP Link header [RFC5988] with a rel value of webmention, or an HTML or element with a rel value of webmention.

Namely

  • Link Header (MUST)
  • HTML or tag

Not all implementations on the social web are based on HTML. Other serializations need to be handled in order to achieve interoperability with existing standards.

Suggestions

  • Move the link header to a MAY
  • Drop mention of HTML to an example, but reword the text to say that the serialization MUST link to the webmention endpoint in the body of a document, in a standards compliant way

I much prefer this link to be in the body, as not every implementor will have access to link headers, and some may wish to use mentions.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/aaronpk/webmention/issues/40

melvincarvalho commented 8 years ago

This WG isnt chartered to use SVG or PNG as a data interchange format. Nor should that be in scope!

PNG for example should be used as an image. In the context of the social web it would be much better to embed this image in a post, especially if you want it to have semantics such as tagged People. Facebook do this quite successfully, for example.

voxpelli commented 8 years ago

To me it makes sense to align the discovery part with that of Pubsubhubbub: http://pubsubhubbub.github.io/PubSubHubbub/pubsubhubbub-core-0.4.html#rfc.section.4 I'm not sure how compliant that is with any charter, but as an implementer of both WebMention and Pubsubhubbub and with consideration for the work done in adapting Pubsubhubbub to support multiple formats, I think it would be a good idea to have the two mostly align.

That means: Prefer Link header but also specifically allow alternative web linking based approaches.

(One thing to keep in mind with the MUST on Link headers is that it's hard for eg. static sites to support so a SHOULD would be preferable based on my implementation experience with WebMention as is)

kevinmarks commented 8 years ago

Not all implementations on the social web are based on HTML. Other serializations need to be handled in order to achieve interoperability with existing standards.

Suggestions

Move the link header to a MAY Drop mention of HTML to an example, but reword the text to say that the serialization MUST link to the webmention endpoint in the body of a document, in a standards compliant way I much prefer this link to be in the body, as not every implementor will have access to link headers, and some may wish to use mentions.

This is a misunderstanding of who is being mandated here. A Sender MUST check for Link headers first, then look in the document. There is no obligation on the Receiver to add Link headers - that is why a fallback exists.

Link headers mean other serializations are intrinsically supported, as the Sender has no requirement to parse the serialization. - hence my discussion of SVG and PNG. This is not theoretical; see the webmentions displayed here:

http://svgur.com/s/5F

If you want to define parsing rules for rel links in non-HTML serializations, that sounds like defining a spec extension to me.

aaronpk commented 8 years ago

It's true that not all webmention targets are HTML documents. Because of this, I think it's reasonable to clarify the text, changing

The sender MUST fetch the target URL (and follow redirects [FETCH]) and check for an HTTP Link header [RFC5988] with a rel value of webmention, or an HTML <link> or <a> element with a rel value of webmention.

to

The sender MUST fetch the target URL (and follow redirects [FETCH]) and check for an HTTP Link header [RFC5988] with a rel value of webmention, and if the content-type of the target URL is HTML, the sender MUST also check for an HTML <link> or <a> element with a rel value of webmention.

Requiring all senders to check for the HTTP Link header provides the largest opportunity for interop among implementations, since it's possible to publish a Link header regardless of content type.

If you have specific examples of wanting to advertise a webmention endpoint in a non-HTML document, please document them and suggest a (as you said) "standards-compliant way" of advertising the endpoint in the document.

sandhawke commented 8 years ago

Non-HTML documents for which webmentions would be good:

Refback might be a little more natural for these... (Trying to think of how Webmention is better than Refback.... Not thinking of any ways.... Oh well.)

aaronpk commented 8 years ago

Currently, @kevinmarks has implemented webmention discovery on his SVG images by using the HTTP header. In this post, http://lombardpress.org/2016/04/16/iiif-webmentions/ he talks about discovering the webmention endpoint in a JSON-LD document. These are two examples that are actually implemented.

aaronpk commented 8 years ago

Closed by adding clarifying text as per https://www.w3.org/wiki/Socialwg/2016-06-07-minutes#webmention-40-resolution