So I just found out today that you can use <base href=""/>
to specify the base URL for relative URLs. It seems so awesomely convenient, and I'm surprised why it's not mentioned more often. Is there any reason to not use it? It's not anything new, right?
It's part of the HTML 4.01 specification (and also the latest draft of the HTML 5 spec). You're good to go.
From section 12.4 of the HTML 4.01 spec:
This attribute specifies an absolute URI that acts as the base URI for resolving relative URIs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With