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