Answer the question
In order to leave comments, you need to log in
How do I know if a user has a feature enabled - without cross-tracking?
I have a task to learn, whether the given function is activated at the user.
Tell me, how can I find out?
Answer the question
In order to leave comments, you need to log in
As far as I understand, there is no information about this in window.navigator . And if not, then you will have to determine by some specific signs whether the browser prohibits tracking, for example, through cookies . In any case, from the materials found, it seemed to me that the "Prevent cross site tracking" option simply turns on ITP 2.x , about which there is enough information on the Internet. One of the ways that I see is based on the fact that the frame accessing the resource under your control tells the parent document whether it managed to get through to some important cookies or not.
PS: either I found a solution, or one of the three - ITP 2.0 introduces the document.hasStorageAccess method, respectively, you can check what value this method returns and dance from it. Here the dude dashed off a small script for such a check . I checked this method on the eighth iPhone, it returns false if the "Prevent cross site tracking" option is off, and true if it is on.
If "Prevent cross site tracking" is really only about ITP 2.0, and in addition I am not mistaken in reasoning anywhere, then the check function could look something like this:
async function ITPIsActive() {
if (document.hasStorageAccess && document.requestStorageAccess) {
const access = await new Promise(function(res, rej) {
document.hasStorageAccess().then(res, rej).catch(rej);
});
return access;
} else {
return false;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question