When following links, resolve relative URLs against the current page's base URL:
/path → https://current-host/path
./relative → relative to current path
#fragment → same page (could scroll to section)
//other.com/path → protocol-relative
- Handle
<base href> tag if present
This is critical for the browser to actually be usable on real websites.
When following links, resolve relative URLs against the current page's base URL:
/path→https://current-host/path./relative→ relative to current path#fragment→ same page (could scroll to section)//other.com/path→ protocol-relative<base href>tag if presentThis is critical for the browser to actually be usable on real websites.