- From: Roger Hågensen <rescator@emsai.net>
- Date: Mon, 26 Apr 2010 22:17:56 +0200
Idea originally posted at https://bugzilla.mozilla.org/show_bug.cgi?id=409508 <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 was: This tracking script has a url rewrite to it so it looks nice in log parsers etc. The behavior would be similar to doing this: <a href="http://example.com" ping="/trackout/http://example.com">Example.com</a> <a href="links/">Links</a> <a href="http://mozilla.org" ping="/trackout/http://mozilla.org">Mozilla.org</a> if the meta tag is<META name="Ping-prefix" content="http://yoursite.com/trackout/"> the behavior would be similar to this: <a href="http://example.com" ping="http://yoursite.com/trackout/http://example.com">Example.com</a> <a href="links/">Links</a> <a href="http://mozilla.org" ping="http://yoursite.com/trackout/http://mozilla.org">Mozilla.org</a> 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" ping="/trackout?url=http://example.com">Example.com</a> <a href="links/">Links</a> <a href="http://mozilla.org" ping="/trackout?url=http://mozilla.org">Mozilla.org</a> 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/"> and <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/
Received on Monday, 26 April 2010 13:17:56 UTC