After Chrome update Cookies default to SameSite=Lax
Thanks for this cool plugin!
I came across a limitation when the site is embedded in an external site the cookies do not work, after doing a bit of research found that this is a change on the way Google Chrome works with cookies ref.
The solution is to add this “; SameSite=None; Secure” when setting the cookie on the file js/ddLastViewedFront.min.js, I tried it and it works, putting it here just in case is helpful to someone and hopefully it will be integrated into the main plugin soon.
// the complete unminified version on js/ddLastViewedFront.js would be
document.cookie = cookie['name'] + "=" + (cookie['list']) + "; expires=" + expires + "; path=" +cookie['path'] + "; SameSite=None; Secure";
Here is the change on PHP side, last-viewed.php line 150:
setcookie($cookie['name'], $cookie['list'], $cookie['expire'], $cookie['path']);
setcookie($cookie['name'], $cookie['list'], array('expires' => $cookie['expire'], 'path' => $cookie['path'], 'samesite' => 'None', 'secure' => true));
- The topic ‘After Chrome update Cookies default to SameSite=Lax’ is closed to new replies.