因为开发环境需要, 我们会把Chrome浏览器的same-site-by-default-cookies和cookies-without-same-site-must-be-secure两项都在flag里禁用了
Chrome 91版本, Chromium直接把选项给关了而且设置成默认开启.

 

但是文中还写了"In Chrome 94, the command-line flag --disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure will be removed", 也就是说这个SameSiteByDefaultCookies和CookiesWithoutSameSiteMustBeSecure还没有被移除, 但是这个所谓的command-line flag是个什么东西呢?

 

这个command-line flag是指在启动Choromium时所带的参数, 在windows中可以通过修改应用的快捷方式目标属性来给启动的应用加上参数.

 

Chromium支持的command-line flag, 具体操作过程如下:

 

在右击Chrome/Edge的快捷方式, 点击"属性".

 

在"目标(Target)"属性中末尾加上

 

--disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure

 

 
Mac 设备下首先关闭浏览器, 打开终端输入以下指令
open -a "Google Chrome" --args --disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure

Microsoft Edge
open -a "Microsoft Edge" --args --disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure

相关文章:

  • 2022-12-23
  • 2021-11-19
  • 2022-01-13
  • 2022-12-23
  • 2021-08-28
  • 2022-02-08
  • 2021-08-18
猜你喜欢
  • 2022-12-23
  • 2021-03-31
  • 2021-11-27
  • 2021-05-27
  • 2018-12-27
  • 2022-12-23
  • 2022-01-03
相关资源
相似解决方案