HTMLAnchorElement: ping プロパティ

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

pingHTMLAnchorElement インターフェイスのプロパティで、スペースで区切られた URL のリストです。リンクを追ったとき、ブラウザーは本体に PING と記載された POST リクエストを URL に送信します。

これは <a> 要素の ping を反映します。

メモ: このプロパティは Firefox では効果を発揮せず、プライバシーやセキュリティ上の懸念から、その使用が制限される可能性があります。

html
<a
  id="exampleLink"
  href="https://example.com"
  ping="https://example-tracking.com https://example-analytics.com"
  >Example Link</a
>
js
const anchorElement = document.getElementById("exampleLink");
console.log(anchorElement.ping); // Output: "https://example-tracking.com https://example-analytics.com"

仕様書

Specification
HTML
# dom-a-ping

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
ping

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support

関連情報