I’m getting this warning on the browser console for my Wordpress site.
A cookie associated with a cross-site resource at
https://www.google.com/ was set without the
SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with
Secure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at
chromestatus.com/feature/5088147346030592 and chromestatus.com/feature/5633521622188032.
I tried to fix the problem by adding the following codes to the child theme functions.php file, but nothing happened. I believe I am missing something, maybe an code opening or something else since I am not a PHP expert.
setcookie(‘same-site-cookie’, ‘foo’, [‘samesite’ => ‘Lax’]);
setcookie(‘cross-site-cookie’, ‘bar’, [‘samesite’ => ‘None’, ‘secure’ => true]);
This file has been truncated.
Copyright 2019 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# PHP example for `SameSite=None; Secure`
As of PHP 7.3.0 the
Please note that I am running PHP 7.4.
Can you please help my fix this warning.
Your issue seems not to be related to hestia, please have a look at this thread, it will guide you to a new forum which should be the right place for your question:
Serverz.net - forum about hosting industry
Unless you embed your wordpress in a iframe in an authenticated state it is no issue…
Thank you for sharing this thread with me.
Serverz.net forum is not open yet. I’ll check the link another time.
I apologize for posting something not related to hestiaCP.
Thank you for your support.
Its just an annoying warning I was hoping to overcome. Its not affecting the performance nor the styling of the site.