converspace / webmention

A modern alternative to Pingback.
webmention.org
173 stars 18 forks source link

Hard-code link header and link tag format #19

Closed cweiske closed 11 years ago

cweiske commented 11 years ago

The pingback specification hard-codes the link header format so one can run a regexp on the HTML instead of having to parse it. Webmention should do the same.

The same could to be done with the HTTP Link header - the < and > around the link, and double quotes around the relation.

pfefferle commented 11 years ago

Good idea! What about a simple sentence and a reference to the pingback-chapter at the sender-discovers-receiver-endpoint chapter (https://github.com/converspace/webmention/tree/v0.2#sender-discovers-receiver-endpoint) ???

pfefferle commented 11 years ago

BTW. I think it would be nicer to move the "sender-discovers-receiver-endpoint" to an extra chapter to describe the autodiscovery part a bit more detailed!

cweiske commented 11 years ago

Please also switch the order of the attributes in the HTML link tag. Pingback uses <link rel href>, webmention currently <link href rel>. Implementations that support both webmention and pingback could use a single regexp if the <link rel href> would be enforced by the webmention spec.

pfefferle commented 11 years ago

+1

barnabywalters commented 11 years ago

@cweiske @pfefferle demanding strictly ordered + laid out HTML makes things easier for consumers at the expense of publishers, which is a known anti-pattern. We should optimise for ease of publishing.

Also, many implementations are already parsing the target HTML for reply-contexts (e.g. @aaronpk (example), @jschweisnberg (example and myself (example)), demonstrating that parsing HTML is not a significant barrier.

(originally posted http://waterpigs.co.uk/notes/4SFGod/)

sandeepshetty commented 11 years ago

It's better to make libs available that make this easy (like https://github.com/phpish/link_header) than enforce artificial restrictions.