Feature detection of <a ping> (Hyperlink Auditing)

243 views Asked by At

The ping attribute of the a element is used for hyperlink auditing - basically when a link is followed each url listed in the attribute is 'pinged' with a HTTP POST.

According to to Can I Use it's supported on all major modern browsers except Firefox (one day maybe).

How do I detect with JavaScript if the browser supports this functionality?

1

There are 1 answers

0
Guerric P On BEST ANSWER

The following expression "ping" in HTMLAnchorElement.prototype will return true if the browser supports the ping attribute, false otherwise.