Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Type "ping" in network tab

When consulting network tabs I saw some Google analytics calls: enter image description here

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.

like image 892
Arcord Avatar asked Jul 21 '26 06:07

Arcord


1 Answers

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.

like image 84
Dheeraj Vepakomma Avatar answered Jul 22 '26 19:07

Dheeraj Vepakomma