W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2005

[whatwg] <a href="" ping="">

From: Christian Schmidt <whatwg.org@chsc.dk>
Date: Wed, 26 Oct 2005 20:14:14 +0200
Message-ID: <435FC776.4060806@chsc.dk>
Ian Hickson skrev:
> On Tue, 25 Oct 2005, Christian Schmidt wrote:
>>One backwards-compatible way (that doesn't require scripting) to solve 
>>this problem would be to add a new attribute that specifies the eventual 
>>target URI:
> That's an interesting idea.
> One problem (a blocker problem IMHO) is that it doesn't really allow for 
> moving to a world where, once HTML5 is widely supported, the redirect 
> pages can stop redirecting, and just log and return nothing.
Adding a redirect capeability to a tracking CGI script is extremely
simple (usually one line of code). Considering that tracking scripts are
relatively rare (they are used often, but not many people hack their own
tracking scripts), I don't think it would be a big gain if tracking
scripts wouldn't have to support redirecting.

> It's not as clean as href="" ping="".

>>- The server hosting the tracking CGI script should be alive.
> Again, same with any system.
Not necessarily. With the solution used today, the server hosting the
tracking script must be alive - otherwise the user wont be redirected to
the target URI. Your suggestion allows the UA to go to the target URI
even though the tracking server is down (the ping can be done
asynchronously). It removes a possibly weak link.

Another thing that is nice about your suggestion is that it provides the
UA a way to send data back to the server right before leaving a page.
This can be done today using e.g. XMLHttpRequest, but it often fails if
the UA loads the new page before the XMLHttpRequest succeeds. Perhaps
this feature can be generalized so that it can be used from script to
send arbitrary data back to the server when the page is unloaded, not
only pings triggered by clicks on links.

Received on Wednesday, 26 October 2005 11:14:14 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:43 UTC