This feature is not Baseline because it does not work in some of the most widely-used browsers.
The ping property of the HTMLAreaElement interface is a space-separated list of URLs. When the link is followed, the browser will send POST requests with the body PING to the URLs.
It reflects the ping attribute of the <area> element.
Note: This property is not effective in Firefox and its usage may be limited due to privacy and security concerns.
<map>
<area
href="https://example.com"
ping="https://example-tracking.com https://example-analytics.com"
alt="example" />
</map>
const areaCollection = document.getElementsByTagName("map")[0].areas;
console.log(areaCollection[0].ping); // Output: "https://example-tracking.com https://example-analytics.com"
| Specification |
|---|
| HTML> # dom-area-ping> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
ping |
12 | 17 | 1This property is exposed but has no effect if thebrowser.send_pings preference is not set to true. See bug 951104. |
15 | 5.1 | 18 | 4This property is exposed but has no effect if thebrowser.send_pings preference is not set to true. See bug 951104. |
14 | 5 | 1.0 | 4.4 | 5 |
HTMLAnchorElement.ping property
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLAreaElement/ping