Can a web page on Safari mobile check whether Settings> Safari> Accept Cookies, Visited, or Always is selected?

Is there a JavaScript function or something that iOS provides so that I can check how strict the cookie setting is from the webpage?

If not what iOS provides, is there an industry standard process for determining which parameter is used? My initial idea is to reset the cookie and check if there is ... but I was wondering if there is a better way.

+1
source share
1 answer

I highly suspect that there is no way to determine what the actual user setting is, but Mobile Safari answers navigator.cookieEnabled. By default, Mobile Safari (and even the Safari desktop) uses "Off Visit." Therefore, if you are interested in third-party tracking via Cookies, you may be out of luck if you don’t find a way around it (obviously Google) or warn the user to change their setting to “Always” (fair / ethical route), I would say that you decided on a reasonable and simple idea by setting a cookie from a third-party site, and then checking whether it really works, and then influencing the result.

A lot of information in this post SO, Safari 3rd party cookie iframe trick no longer works?

, Gruber, http://daringfireball.net/2012/02/cookies_and_privacy

+3

Source: https://habr.com/ru/post/1690524/


All Articles