URL 長什麼樣子¶
URL: scheme://host:port/path
Scheme¶
http, https
Host¶
subdomain.domain.tld
Top layer Domain (TLD)¶
comcom.twiogithub.io
Port¶
httpdefault80httpsdefault443
Path¶
/path?query_key=query_value#fragment
Diagram¶
Example¶
https://example.com:443is same origin tohttps://example.comhttp://eample.com:443is different origin tohttp://example.com(why?httpdefaultportis 80)http://api.example.comis same site ofhttp://auth.example.com
Extension¶
schemeful-same-siteconsider scheme onsite- HTTP header
Sec-Fetch-Site([time=April, 2020]) can know where request came fromsame-sitesame-origincross-sitenone