[whatwg] Ping + Ping-prefix meta element.

Roger Hågensen rescator at emsai.net
Mon Apr 26 13:17:56 PDT 2010

Idea originally posted at 

<META name="Ping-prefix" content="/trackout/">

If the browser see this meta tag it will behave as if ping attribute was
applied to all externally leading hrefs with the prefix added to the start.
In the example above this would be how the browser should treat it as if it
This tracking script has a url rewrite to it so it looks nice in log parsers

The behavior would be similar to doing this:

<a href="http://example.com"
<a href="links/">Links</a>
<a href="http://mozilla.org"

if the meta tag is<META name="Ping-prefix"

the behavior would be similar to this:

<a href="http://example.com"
<a href="links/">Links</a>
<a href="http://mozilla.org"

Here is an alternative tracking script (no url rewrite on this one).
<META name="Ping-prefix" content="/trackout?url=">

This results in a behavior similar to doing:

<a href="http://example.com"
<a href="links/">Links</a>
<a href="http://mozilla.org"

This new meta tag would allow even more rapid adoption as web developers would
not need to add a ping attribute to hundreds of pages with maybe dozens of
links on each page, and it would be very easy to add such a meta tag to various
template scripts/frameworks with just a line of code.

To the web developer AND the end user it would also mean no size increase,
whereas using the ping attribute would potentially double the number of bytes
per href..

Alternatively the body tag could be used instead of a meta tag.
In which case the implementation could be:

<body ping="/trackout/">
<body ping="/trackout?url=">
and so on...

This may actually be more fitting. (considering<body target="">  attribute
behaves in a similar way to my idea)

Firefox 3 team has the chance to test this out and see which is more popular.
ping attributes in individual a href tags or a single ping attribute in the
body tag.

With a possible saving of bytes due to a single ping attribute being used there
would be no need to use javascript hacks nor redirect urls, nor ping attributes
per url. How can one go wrong?

I am already testing ping attributes for urls on my site,
but damn adding that ping to all those pages is a pain.
a<body ping="">  to set a default prefix and have the url appended to it
would allow adding url ping by just a single line in the sites template.

PS! individual ping attributes would override the global one obviously, just
like a target attribute would.
Oh, and could someone on the HTML5 list poke some of the guys over there and
see if a ping attribute for the body tag in a similar vein could be considered?

Roger "Rescator" Hågensen.
Freelancer - http://EmSai.net/

More information about the whatwg mailing list