HTMLAnchorElement: ping プロパティ
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
ping
は HTMLAnchorElement
インターフェイスのプロパティで、スペースで区切られた 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 GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
ping |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
関連情報
HTMLAreaElement.ping
property