Summary

  • HTML's ping attribute lets a link name notification endpoints alongside its visible destination. A browser may send a separate background POST when the link is followed.
  • Designers argued that naming the notification openly could improve on disguised redirect links. The history turned on a harder question: would a person clicking the link ever be shown that second address?

Picture a door with its destination painted in large blue letters. You push it and arrive where promised. Behind the frame, a second bell rings in a building you never meant to visit. The little bit of HTML responsible is ping: an attribute on a link that names one or more addresses to notify when the link is followed. The door is href; the bell has its own address. A click can be two journeys.

The idea was already being argued over on the WHATWG mailing list in October 2005. Participants considered whether a browser should show the secondary requests and let people disable them. Even then, the fight was about the interface as much as the network. Putting an address in markup makes it inspectable to somebody reading the page source. It does not put that address before the eyes of somebody simply reading the page.

The argument for ping had a sting of its own. In January 2006, Tyler Close wrote to WHATWG that sites could already count outbound clicks by making a link pass through a redirector. That technique could hide the real destination from the reader and make copying or bookmarking the link awkward. Name the real destination in href, he argued, and name the reporting address separately in ping. The tracking would at least be written down in the page. His case was a proposal about what a better design could expose, not evidence that browsers had solved disclosure.

The machinery is almost comically small. In the maintained HTML Standard, the attribute contains HTTP or HTTPS URLs separated by spaces. When a person follows the link, the browser can send a POST to each allowed notification address. The body is the four bytes PING, with media type text/ping. It is a knock, not a miniature copy of the page. The request can accompany the main navigation; the browser ignores the response body. The standard also permits the browser to ignore any or all ping addresses according to user preference. The page supplies the bell; the browser decides whether to ring it.

That last distinction matters. A written mechanism is not a universal account of browser behavior. Nor does the short PING body mean no information travels: the request goes to a chosen address, and the standard specifies conditional Ping-To and Ping-From headers. The interesting question is which party sees and controls the extra journey. The page author can attach the addresses. A browser can decline the request or make it visible. The reader cannot evaluate what the interface never presents.

In November 2007, Boris Zbarsky described the problem in the WHATWG discussion. A technically correct notice in a status bar might mean little to people who never look there. He expected the default interface might show no indication. That was a contemporary forecast, but its central worry has teeth: transparency cannot survive as an invitation to open developer tools. If the extra bell is to count as visible, somebody must hang a sign where people actually look.

The standards history refused to march in a straight line. On 4 March 2010, a W3C HTML working-group chair reported that a call for consensus had passed to remove <a ping> from its HTML5 draft. The message explicitly allowed the feature to be proposed later. This was a draft decision in one standards process, not a decree that browsers had stopped ringing bells. A 2018 W3C HTML 5.3 working draft again described hyperlink auditing. It also said no browser was then known to offer an interface through which users could manage or even learn that auditing was happening. The draft praised a possible privacy advantage while admitting that its most human part remained a promise.

Today's WHATWG HTML Standard retains the mechanism. It says browsers may indicate the secondary requests, perhaps by showing their hostnames beside the destination, and should allow users to adjust the behavior. Those are choices at the browser's surface. The code can tell us what request is possible. The interface tells the person who clicked what power they really have.

The original sales pitch contained a sharp insight: a direct destination is better than a link disguised as a detour. But the second address cannot be made socially visible by writing it in a field that most readers never see. The link still opens the promised door. The enduring question is whether the other bell has a label, a switch, and an honest place on the sign.