The scope of the browser cookie, does it distinguish between protocols and ports?

question 1: cookie can control path&domain to control its scope, so will different protocols or ports now have access to cookie?

< del > question 2: one of the drawbacks of cookie is that all requests come with accessible cookie, but we have observed that some websites have xhr requests with cookie, some static resources with cookie, some without cookie (in the case of the same domain name) < / del >
, and we see that cookie is not brought because of the local cache

.
May.06,2021

this picture comes from teacher Ruan Yifeng's blog

.
Menu