google-chrome – 为什么chrome会在资源标签中显示所有域的Cookie

我已经打开了Chrome的Web开发人员工具(F12)并导航到了“资源”选项卡.然后,我选择了Cookies选项卡,然后单击特定于我的域inreado.git.local的cookie.但是,该视图显示了除我以外的域名的Cookie,例如google.com和其他域名(请参阅附图).为什么这样?我希望只有特定于我的域的cookie才会出现在视图中. 最佳答案 正如Chrome DevTools
documentation中所解释的那样,那是因为这些cookie是在iframe中设置的:

Cookies are listed by domain. This includes the main document as well as all nested frames. Selecting one of these “frame groups” displays all cookies, for all resources, for all frames in that group. There are two consequences of this grouping to be aware of:

  • Cookies from different domains may appear in the same frame group.
  • The same cookie may appear in several frame groups.
点赞