finally, got my webpage broken after I receive a message about the cookie cross-site resource:
A cookie associated with a cross-site resource at http://google.com/ was set without the
SameSite
attribute. It has been blocked, as Chrome now only delivers cookies with cross-site requests if they are set withSameSite=None
andSecure
. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
EDIT: About my WebPage: It is a page, that I have on my localhost that displays videos from "https://www.googleapis.com/youtube/v3"
Of course I searched the internet for a solution and there is one (or even more) like here: How to solve `SameSite` attribute
And also an answer including my searched Javascript solution: https://github.com/GoogleChromeLabs/samesite-examples/blob/master/javascript.md
Calls to document.cookie continue to work as they have before. You can provide the SameSite attribute as part of the assigned string.
// Set a same-site cookie for first-party contexts
document.cookie = 'cookie1=value1; SameSite=Lax';
// Set a cross-site cookie for third-party contexts
document.cookie = 'cookie2=value2; SameSite=None; Secure';
but I fail to implement it. Where should I write this in? In the chrome console? And when yes, then to which cookie? All I got, is the following:
Only one cookie.
But when I look at the "Application" bar in chrome, then at the dropdown menu of cookies I see a lot of them:
Also, when I look at the "issues" bar in Chrome I see the affected cookies and request (which is, of course <iframe>
):
but don't know, how to handle this.