This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24251 - 1. User agent should identify in Accept headers that it can handle Click Pings so that web site can decide whether to use JS alternatives
Summary: 1. User agent should identify in Accept headers that it can handle Click Ping...
Status: RESOLVED NEEDSINFO
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-09 09:36 UTC by contributor
Modified: 2014-01-14 00:13 UTC (History)
2 users (show)

See Also:


Attachments

Description contributor 2014-01-09 09:36:02 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/
Multipage: http://www.whatwg.org/C#hyperlink-auditing
Complete: http://www.whatwg.org/c#hyperlink-auditing
Referrer: http://workbench.cadenhead.org/news/2847/tracking-click-pings-phpmysql

Comment:
1. User agent should identify in Accept headers that it can handle Click Pings
so that web site can decide whether to use JS alternatives

Posted from: 195.166.157.5
User agent: Mozilla/5.0 (Windows NT 6.1; rv:26.0) Gecko/20100101 Firefox/26.0
Comment 1 Ian 'Hixie' Hickson 2014-01-09 18:45:45 UTC
You can't rely on the user agent not lying to you, really. The only way to really do this is to click a fake link and see if you get a ping, if you don't, then assume you need to fake it with JS.

Preferably, though, if you want to honour user desires (they might have disabled ping="" on purpose), test whether HTMLAnchorElement objects have a "ping" attribute. If they do, assume ping="" works, otherwise, assume it doesn't. Since the alternative would be in JS anyway, you can just stick that at the top of the script and disable the script if links have a .ping attribute.