LoginSignup
2
0

More than 3 years have passed since last update.

[Chrome80以降] document.cookie によるCookie生成時のSameSite属性について

Last updated at Posted at 2020-10-16

課題

Chrome 80 以降、CookieのSameSite属性がデフォルトでLaxになる。

Chrome 80が密かに呼び寄せる地獄 ~ SameSite属性のデフォルト変更を調べてみた

しかし、Chrome 80 以降で、<script> タグ内等の


document.cookie="test=123"

によって生成されたCookieを Developer Tools で確認してみても、SameSite属性がLax扱いとなっていないように見える。

image.png

実際のCookieの挙動が None 扱い か Lax 扱いかわからない。

結論

見た目SameSiteが指定されていないように見えても、Laxが付与されたCookieと同じ挙動をするようになっているとのこと。※1

※1 言質取ってきた: https://github.com/GoogleChromeLabs/samesite-examples/issues/42#issuecomment-709240567

まとめ

公式のdocumentが分かりづらいので修正を打診する。

https://github.com/GoogleChromeLabs/samesite-examples

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0