JavaScript Cookies and reading in PHP

I would like to know if Cloudflare would interfere with a PHP script reading a cookie set by JavaScript on the homepage of my website.

JavaScript on my homepage

document.cookie="cookie_name=xyz;path=/;samesite=strict;secure";

Reading it in PHP

$my_cookie = isset( $_COOKIE['cookie_name'] ) ? $_COOKIE['cookie_name'] : false;
if($my_cookie !== false){
//my script...

I have noticed that there have been instances when PHP can’t find the cookie, but it can usually find it.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.