Pingback


After seeing the "X-Pingback" header on Erica's blog the other night, I spent a couple hours going down the Linkback rabbit hole. Of course, I had to verse myself on Refback / Trackback / Pingback / WebMention first. But I ultimately settled on Pingback multiple different times, for multiple different reasons.

(First) It's what she was using and I wanted to understand it.
Then I realized what Refback was and that Refback is the name of what we had previously been discussion.
(Second) It was the successor to Trackback. (Thus newer and likely had a reason to replace Trackback.
Then I saw WebMention ... but decided against it.
(Third) Pingback uses XML-RPC, thus XML. (Which is a loaded gun unto it's self.)
But .... but .... *guppyMouth* .... *sigh* .... Okay...
(Fourth) I'm going to be coding XML for AJAX enabled pages on my site in the (near) future. So, that means that I'll be coding in XML, the same thing that XML-RPC uses. Thus conservation of efforts.
Done. Decision made.

Deciding which linkback method to use was only the first step. I had to decide how I wanted to do it. As usual, I tend to do things differently than most other people, for my own odd reasons.

  1. I decided to use the ".xml" file extension because that's what is both POSTed to it -and- what is received from it. Thus, ".xml" is the proper extension for the page, no matter what the back end technology powering it is.
  2. I decided to name the page "pingback(.xml)" because that is the sole purpose of the page. Not something generic and non descriptive like "RPC2".
  3. I decided to make the page behave differently depending on what HTTP method was used to request it. The "POST" method is used for pingbacks so it has to stay. Seeing how the script is for non-human use, I wanted some nice behavior for humans that might stumble across it. So when a human uses a "GET" HTTP method, they will receive a 302 redirect to a human friendly page.

So, after more hours than it should have taken (I was brain dead), I am happy to say that I have a functional pingback page on my site. As an added bonus, my pingback handler will actually take the data that is POSTed to it and convert it to a Refback for easy analysis in my access logs. (So, we are back to what I was originally discussing with friends.) Additionally, I don't have to worry about the "SPAM" verses "someone else's (rogue) comment(s)" issue because the pingback does not show up on the site, rather it simply is logged for later analysis / human consumption.

This brings me to a short aside. The pingback technique is a nice simple method for one (source) site to notify another (target) site that there is a link from the source to the target. That's it. There is nothing in the pingback specification that states what that notification is to be used for. Further, all the complaints that I saw about pingback had to do with what was done with the notification after it was received. Thus, IMHO... <soapbox>Pingback is not the problem, and people shouldn't treat it is as such. Rather they should turn their attention to what is done -after- the pingback is successfully received. Not complain about the underlying technique that works quite well.</soapbox>