How to access data sent by navigator.sendBeacon
Posted: Wed Oct 14, 2015 9:05 am
Documentation indicates sendBeacon sends its data via a HTTP POST request, but I cannot find the data sent.
Here is my javascript code : navigator.sendBeacon('log.php','Lost Data')
Browser logs indicate the "Lost Data" is the "request payload" for the request
In PHP the request is received but the $_POST variable seems to be an empty array.
I have sent from both Firefox & Chrome to both my local test server (windows) and to the live server (unix), all react the same.
What am I doing wrong?
Here is my javascript code : navigator.sendBeacon('log.php','Lost Data')
Browser logs indicate the "Lost Data" is the "request payload" for the request
In PHP the request is received but the $_POST variable seems to be an empty array.
I have sent from both Firefox & Chrome to both my local test server (windows) and to the live server (unix), all react the same.
What am I doing wrong?