I'm working on a Magento2 project. I need to know if the client browser has third-party cookies disabled. I already saw this post Check if third-party cookies are enabled but it doesn't work anymore on chrome
Asked
Active
Viewed 3,410 times
0
-
https://stackoverflow.com/a/70774792/1397021 – Abhishek Chandran Jan 19 '22 at 17:06
1 Answers
1
Put this code on your Third Party App/Site
var CookieName = "TestCookie";
document.cookie = "CookieName=TestCookie;samesite=None; secure";
if (document.cookie.indexOf(CookieName) == -1) {
console.log("Cookies are required to use shopping carts.");
if (document.cookie.indexOf(CookieName) != -1) {
console.log("Thank you for enabling Third-Party cookies");
}

Abu Dujana Mahalail
- 1,547
- 1
- 8
- 21