3.3.2021
Ping Attribute in a tags
The ping attribute can be included in <a>
tag to automatically send a POST request to the provided URL(s) whenever the link is clicked.
<!-- on clicking ping would be sent to https://usefulangle.com/track -->
<a href="https://usefulangle.com/post/288/html-output-tag" ping="https://usefulangle.com/track">Click here</a>
Multiple Pings, separated with whitespace
<!-- on clicking ping would be sent to https://usefulangle.com/track -->
<a href="https://usefulangle.com/post/288/html-output-tag" ping="https://usefulangle.com/track http://someserver.com/notify">Click here</a>
What is a Ping?
- Ping is basically a HTTP POST request.
- Request body of this POST request just contains the string PING.
- Request does not wait for a response from the server.
By using the ping attribute, browser automatically sends a HTTP request upon a click. No custom code is required. The request will be sent even if the user has disabled Javascript.
Standort Hannover
newcubator GmbH
Bödekerstraße 22
30161 Hannover
Standort Dortmund
newcubator GmbH
Westenhellweg 85-89
44137 Dortmund