When consulting network tabs I saw some Google analytics calls:
Some have the type "ping". I know the ping attribute but it's when a link is clicked and the payload is "PING".
Here I didn't click on anything and the payload is not "PING" (it contains some info for analytics).
The response content/type is "plain/text".
The question What is text/ping and is this a new standard? Is it browser dependent? looks like the same but in that case it has the "PING" payload.
The requests whose type
show up as ping
in Chrome network tab are those that are sent using navigator.sendBeacon()
.
It's intended to be used for sending analytics data to a web server, and avoids some of the problems with legacy techniques for sending analytics, such as the use of
XMLHttpRequest
.