Webmentions is what makes it possible for me to write here about someone else’s blogpost and have my response show up beneath theirs. And vice versa. Earlier mechanisms such as pingback and trackback did the same thing, but slipped under the radar or succumbed to spam. Webmention is a W3C recommendation.
The webmention itself is simple
The core of webmention is straightforward: if I write something here, my webserver will try to let every site I link to in my text know I link to them. This by checking if the sites I link to have an ‘endpoint’, an antenna basically, for webmentions. If a site does, then it will send a simple message to that antenna stating two web addresses, the source (here my blogpost) and the target (here your blogpost). When your site receives a webmention it will do some checking: does my source blogpost indeed link to your target address?
What happens next is less simple
It can quickly get confusing during what happens next.
When my site receives a webmention (this source x links to your target y), all it knows is just the URL of a page that links to me. What my site displays and how it displays that as a consequence of a webmention message depends on multiple factors:
My server will try to read the source blogpost, and see what machine readable information it contains, and what it can know about the source blogpost. These machine readable parts are in the form of microformats.
My server will store some of the information it finds.
Then my website template will show some information from what the server stored when showing the target blogpost on my site.
How well that works depends on multiple factors therefore:
- The available machine readable info in the source blogpost, and whether that info is properly encoded
- The settings of my server for what it stores
- The settings of my site template for what it shows
When something seems to be going wrong, it could be a problem with your site, my site template or my server settings, and it is never obvious which one it is, or if it is the aggregation of multiple issues. It also depends on how easy it is to alter any settings whether you can repair or change things when webmentions are not properly dealt with. Supposedly the Webmention and Semantic Linkbacks plug-ins I use should take care of those issues but it is not obvious that they indeed do.
An example, me and Frank’s sites webmentioning each other
Frank Meeuwsen and I have been mentioning eachother several times and we’ve seen some strange webmention behaviours. For instance in one case Frank’s blog displayed not just a short part of my posting mentioning him, but my entire page including header, footer and sidebar. Clearly something wrong, likely with some of my machine readable encoding, but maybe also something wrong on his end. I suspect my machine readable encoding is indeed faulty but there’s no clear way in which I can change how my webmention plugins deal with that. And if I alter the code, which I could, it is likely the next software update will simply overwrite it.
Yesterday Frank posted about the puzzle webmention is to him in Dutch. Here are some screenshots on how pieces of that puzzle look on my end of things.
Frank’s posting lives at http://diggingthedigital.com//Waar-te-beginnen-met-Webmentions/ In his posting he refers to a posting on my site. He did not send a webmention. But I can do that myself, using a simple form at the bottom of my posting (visible at the bottom of this page too). In that webform I pasted the mentioned url, and that sends the simple webmention message. That message has been received and stored on my server, with the correct source and target address and a timestamp:
What ended up underneath my posting is:
Or as it looks for me as the site’s owner:
A few things stand out:
- There’s no link to the actual blogpost by Frank (the source), just to his general domain
- There’s a link to news.indieweb.org, which is a completely different domain
- There’s no image of the author or an avatar in absence of an image
- There isn’t any content from Frank’s post shown as part of the mention
So what’s happening? Is this an issue at Frank’s end, is it an issue with what I store on my server, or what I show in my site template? One, two, all three of them?
Puzzling over the pieces in this example
The missing avatar. My site tries to look for an avatar in the source, and if there isn’t one, it shows a general one. Here neither happens, it’s just a blank space. The HTML source of my page reveals it does try to show an avatar, the one that Frank sets in his own blog page as the one to use. His site says in the source code:
<a href="/" class="site-avatar"><img src="/images/dtd-avatar.png" class="u-photo" /></a>
The micro format u-photo is interpreted correctly by my site, and it tries to show the linked image. When you go to that image in your browser it works, but if you try to embed it in your own page it doesn’t.
Frank’s image should be visible below this line,
and above this one, but it isn’t.
Probably Frank’s web server prevents bandwidth theft by sending back a white pixel and not the requested image.
[UPDATE] The issue, as Sven points out in the comments, is that this site is https and Frank’s is http. My browser is set-up to reject http material on an otherwise https site. A case of my browser being my castle.[/UPDATE]
Making the avatar fail because my site doesn’t try to store the avatar locally.
The link to news.indieweb.org and the absence of a link to the actual blog post by Frank. The source (Frank’s blogpost) was sent and received correctly as we saw. In the machine readable part of Frank’s site a value is set as ‘canonical’ address for his blogpost.
There is an extra / in that url, and I’m not sure what that might cause, but on my end the canonical that gets saved is very different, it’s that indieweb address.
The odd bit is that indieweb.org address is not mentioned in the source of Frank’s page. At the same time, it seems it isn’t unique to my server, as underneath a posting about webmentions by Sebastiaan Andeweg you see the same thing happening. Frank’s webmention from May 12th shows the indieweb link (and no avatar). Sebastiaan doesn’t use WordPress or the plugins I use as far as I can tell.
So where’s the actual link to Frank’s blogpost? The canonical URL Frank’s posts provides is stored on my server, in the database table for comments as the URL for the author. The indieweb URL however is stored as canonical URL in the comment metadata table in my database. And that gets used for displaying the webmention underneath my blogposting.
The same is true for the absence of the content of Frank’s mention of me. It is collected and stored in the comment table of my site’s database. Yet what is shown underneath my blogpost as mention is constructed only from the comment meta data table, and not the comment table.
Frank’s mention’s content is in my comment database, yet not shown
The metadata fields stored for Frank’s mention in my database
So what’s happening here is a mix of elements from Frank’s site, my webmention plugins and my site template. But how to influence the behaviour of my plugins without seeing that undone with the next update is not clear to me at this point. Nor is how to alter the plugins so I can improve the machine readable microformats on my site.
One of the points of writing on the Internet is our ability to link pages together in a web. We do this in HTML with links, like this:
My friend Ton <a href="https://www.zylstra.org/blog/2018/07/wrapping-my-head-around-webmentions">writes about Webmention</a>.
When that HTML appears here on my website, it looks like this:
And if you click that link, you go to Ton’s blog post.
Wouldn’t it be nice if Ton had way of knowing he was linked to!
That’s what Webmention is for. In addition to the linking, Webmention involves a notification–”hey other website, you got linked to.”
The message is simple; if I want to let Ton’s website know that I’ve linked to it, I send it:
source=https://ruk.ca/content/digging-webmention
target=https://www.zylstra.org/blog/2018/07/wrapping-my-head-around-webmentions
To know where to send it, I need to look at the source of Ton’s page–my target–for something that looks like this:
<link rel="webmention" href="https://www.zylstra.org/blog/wp-json/webmention/1.0/endpoint" />
That tells me “to let this blog post know it was linked to, send the Webmention to this URL.”
(It there’s nothing on the other end of the link that references Webmention, it’s safe to assume it doesn’t receive them, and not send a message; Webmention remains a nascent standard).
Drupal 7, which I use to manage this blog, has no built-in support for Webmentions. The Vinculum module comes tantalizingly close to supporting them, but hasn’t been updated in a long while, and it doesn’t work out of the box.
To work around this limitation, I ripped out the best parts of Vinculum–yeah open source!–and wrote my own Webmention module. Right now it only sends Webmentions, which is okay because, for the time-being, I can use the excellent non-intrusive Webmention.io to handle that part.
As Ton writes in his post, “The webmention itself is simple… What happens next is less simple.”
Here’s the less-simple part that happens once I click “Post”.
First, my module has to look at the body of my post and extract the URLs of all the pages I’ve linked to; for this post, it gets:
https://www.zylstra.org/blog/2018/07/wrapping-my-head-around-webmentions
https://indieweb.org/Webmention
https://www.drupal.org/project/vinculum
https://webmention.io
https://ruk.ca/content/digging-webmention
https://www.zylstra.org/blog/wp-json/webmention/1.0/endpoint
https://aaronparecki.com/2018/06/30/11/your-first-webmention
https://indiewebify.me/
Next it has to find out which of those, if any, have the ability to receive Webmentions; it finds these endpoints:
https://www.zylstra.org/blog/wp-json/webmention/1.0/endpoint
https://webmention.io/indiewebcamp/webmention
https://webmention.io/pingback/webmention
https://webmention.io/aaronpk/webmention
And, finally, for each of those it sends the actual Webmention.
If you’re looking at adding Webmention superpowers to your writing on the web, take a look at Sending your First Webmention from Scratch, which is a very clear step-by-step guide to the system, with some helpful pointers to its fiddly bits. And, indeed, because I sent that post a Webmention, you’ll find a link back here:
The IndieWebify.Me tool is also a useful resource for debugging the same fiddly bits.
(By the way, should you send a Webmention to this post, it will be received but not–yet–displayed here; that’s my next step).
Webmention | Ton Zylstra | Drupal
Inspecting some pieces of puzzling #webmention behaviour zylstra.org/blog/2018/07/w… @frankmeeuwsen @sebsel @martijnvdven #indieweb
Lot’s of things going on here, but I think I figured them all out.
missing avatar
Frank’s site is only served over HTTP, not HTTPS. In
<img src="">
, that’s fine and only creates a warning in the browser, but in your comment display it is included in<img srcset="">
. Here, browsers do not accept mixed content, so the image is blocked and not shown. This is also why there is no default avatar: the avatar was found and is requested in the HTML, but the browser refuses to load it.link to news.indieweb.org
That’s not true, and the problem in this case. There’s a
<a href="https://news.indieweb.org/nl" class="u-syndication"></a>
as the only top-level link inside his post, and no expliciturl
property set. This causes the microformats parser to assume that this link points to the canonical location of the post, and it is thus used for comment display. This seems like a problem with the microformats specification, and I’ll follow up on it there, but for now the easy fix would be for Frank’s posts to mark up their permalink, e.g. by adding aclass="u-url"
to the link on the headline.absence of content in comments
This is intentional. Frank’s post only mentions your post (=includes a link to it), it is not marked up as an explicit reply. Only replies are shown with content, since for mentions this is often misleading.
Ton continues to wrap his head around Webmention, and wonders about how mentions should be displayed on the “mentioned” site:
The h-entry page on the Microformats Wiki sheds some light on this, providing some options for marking up links in a way that affects the semantics, and the rel-values page in the IndieWeb wiki has some further discussion of options, but there doesn’t yet seem to be a clear way forward here.
It does seem like it would be useful to allow an author to add semantics to links that would differentiate between commenting, mentioning, liking and re-posting, and that seems to be the way that things are headed.
Looking at a section of Ton’s post, for example, where he links both to Sven Knebel’s contribution and to his own, both links are marked it with u-in-reply-to:
<p>I very much appreciate how <a href="https://www.svenknebel.de/posts/2018/7/4/" class="u-in-reply-to">Sven Knebel extensively responded</a> to my previous <a href="https://www.zylstra.org/blog/2018/07/wrapping-my-head-around-webmentions/" class="u-in-reply-to">posting on some Webmention issues</a> I came across. Some of his responses do make me have new questions.</p>
While he’s clearly replying to Sven’s post, Ton’s reference to his own post isn’t really “in reply to” himself, it’s merely mentioning it; perhaps these mentions should be rendered differently?
Webmention | IndieWeb | Microformats
Het voordeel van bloggen en zo je gedachten publiek maken, is dat anderen mee kunnen denken en je van mogelijke oplossingen voorzien. Na mijn vragen over webmentions, kwam Ton al snel met een eigen blogpost, gevolgd door Peter (digging the title and URL there Peter!). Ton geeft een korte uitleg over webmentions waarna hij aan de hand van mijn eerdere blogpost zijn kant van het proces laat zien. Inclusief wat er mis gaat. Dat gaf mij weer wat inzicht in de richting voor mijn eigen oplossing. Peter gaat vervolgens dieper in op de stappen die de software maakt aan zijn kant. Wederom erg inzichtelijk.
Peter verwijst naar de site IndieWebify.me, met fraaie checklists om je site na te kijken op een aantal onderdelen.
Microformats
Door IndieWebify.me kwam ik al op een eerste verbeterpunt voor mijn eigen site, Microformats. Dit zijn korte brokjes code die opmaak en betekenis geven aan online content. Met Microformats kun je aangeven of iets een persoon is, of een artikel, een URL, een evenement, een locatie en ga zo maar door.
Aan mijn kant zaten er wat fouten in de microformats, waardoor een webmention bij Ton niet goed werd getoond.
Ik heb zojuist wat kleine aanpassingen gemaakt in de broncode van mijn site, zodat de Microformats weer beter worden getoond. Volgens mij worden webmentions dan eveneens al weer beter weergegeven als ik verwijs naar andere sites. De webmentions naar Peter en Ton zullen het bewijs moeten leveren…
Volgende stappen
Ik zit vandaag wat kort in mijn tijd. We staan op het punt om te vertrekken naar Rock Werchter (want Pearl Jam), dus ik stop nu midden in het de zoektocht naar de juiste oplossingen. Later deze week zal ik de volgende stappen zetten en natuurlijk hier beschrijven!
I very much appreciate how Sven Knebel extensively responded to my previous posting on some Webmention issues I came across. Some of his responses do make me have new questions.
About the wrong URL, i.e. not the source of the webmention, showing up in a Webmention, Sven writes:
…. There’s a href=”https://news.indieweb.org/nl” class=”u-syndication” as the only top-level link inside his post, and no explicit url property set. This causes the microformats parser to assume that this link points to the canonical location of the post, and it is thus used for comment display. This seems like a problem with the microformats specification, and I’ll follow up on it there, but for now the easy fix would be for Frank’s posts to mark up their permalink, e.g. by adding a class=”u-url” to the link on the headline.
To me this reads as a vulnerability. I would expect my site to always take the source from the webmention message as URL. That is the only one that has been checked from my end for the presence of a reference to my site (the target). If the source page is allowed to set a different URL, even by mistake like here, that feels extremely counterintuitive. It opens it up to spam. In this case the faulty link is to a benign site, but it could have been pills or malware. It is also strange to me that my server in the comments table of the database correctly stores the source url, but in the meta data table stores a url at the discretion of the source’s website. (Meanwhile Frank has fixed it for now on his end as demonstrated by his webmention to my previous post, but my point remains)
About no content being shown of the blogpost that links to my blogposts Sven says:
“This is intentional. Frank’s post only mentions your post (=includes a link to it), it is not marked up as an explicit reply. Only replies are shown with content, since for mentions this is often misleading.”
This to me doesn’t make a lot of sense. [update: and for my site at least it isn’t true either, I linked back as an explicit reply to my own posting, but it still shows it as a mention].
There is indeed a difference between a direct reply to something (@Frank….) and mentioning that something as part of something else (As Frank says….). Yet that doesn’t warrant a difference in presentation, where a reply would be shown, yet for a mention just the address of the site. It also gives the source control over how something is shown on my site (by setting a different microformat for a link), while I do not have that control.
From the perspective of the reader of my blog it is not enough to only see that ‘some site links to this blogpost’ to click on that link to find out if it might be of interest, it is tremendously helpful to see a piece of that referring page to determine the context in which it refers to my blogpost.
Most if not all of my mentions of others’ blogposts aren’t meant as a direct response but as building or continuing on a line of reasoning, riffing off other people’s ideas. This is the way distributed conversations take place, how ambient humanity is established. Distributed conversations are a fundamental part of blogging to me. It’s not back and forth replies, it’s a jam session. To enjoy the jam session, you need to see the whole band at a glance, not just a list of the line-up while listening to a sole musician. Discoverability and serendipity flow from it.
It used to be that trackbacks did precisely that, show the context in which someone else referred to my blogposts. It is enriching my own posts to show that context underneath them. See below how that looked a long time ago, in a post on information strategies from 2005.
Three trackbacks on an old post of mine, showing context of the linking blogpostThese three posts are not in response to me, but reflections triggered by my posts and extensions of my contribution
So I’d definitely want to show that context for webmentions. What strikes me as odd now is how little control I have over how the Webmention and Semantic Linkbacks plugins actually deal with webmention data. The stuff I’d like to show is stored in my database, but I can’t through the plugins determine how that is shown.
The same is true on the flipside: my site adds microformats so others can machine read my blog, but apparently it doesn’t do it right. Yet I have no control from the mentioned plugins interfaces over how that is done, nor do I have documentation / insight into how the plugins are designed to comply with microformat specifications. So the next step is: read up on microformat specifications, and dive into the code of the plugins to see where it does what, and whether I can change that in ways that won’t be simply overwritten with the first update of WordPress or the plugins. [UPDATE: I installed a different WordPress Theme, called Sempress, as it should be better at adding the correct microformats for this site]
share
share
share
tweet
share
e-mail
Read Wrapping My Head Around Webmentions by Ton Zijlstra (Interdependent Thoughts)
Syndicated copies to: