Код: Выделить всё
document.cookie = "acceptCookies=1; expires=" + new Date(new Date().setFullYear(new Date().getFullYear() + 1)).toUTCString() + "; path=/; SameSite=Strict";
Поэтому я попытался сбросить его с помощью php вот так.
Код: Выделить всё
if ($_COOKIE['acceptCookies'] != "2"){
setcookie("acceptCookies", "2", ['expires' => time() + 3600*24*365, 'path' => '/', 'samesite' => 'Strict' ]);
}
Подробнее здесь: https://stackoverflow.com/questions/791 ... script-php
Мобильная версия