Answer by miken32 for How to detect users setting do-not-track
It's sent as an HTTP header: function dnt_enabled() { return (isset($_SERVER['HTTP_DNT']) && $_SERVER['HTTP_DNT'] == 1); } if dnt_enabled() { // do stuff... } Or, if you're using PHP 7:...
View ArticleHow to detect users setting do-not-track
I was looking through some Google articles and some Firefox developer areas and found that there was an option you can set to not let some sites track your information. I looked into this and did some...
View ArticleAnswer by Vladimir Kornea for How to detect users setting do-not-track
$do_not_track_requested = ! empty( $_SERVER[ 'HTTP_DNT' ] ); All HTTP headers are present in $_SERVER, prefixed with HTTP_.https://www.php.net/manual/en/reserved.variables.server.php#89567
View ArticleAnswer by Grant Miller for How to detect users setting do-not-track
Navigator.doNotTrackIf you want to use client-side JavaScript to check whether or not a user has the dnt request header set, you can use navigator.doNotTrack.This property returns the value of the dnt...
View Article