by rufibarbatus · 15y ago · 0 comments
And you can't be sure. Here's why: if someone saves your page on their hard drive and you're using protocol-relative URLs, the implied "http" just became "file". (Which in fact may be a nice excuse for some clever hacks.)
Test it yourself! Save the following snippet to your computer and see how your browser resolves the URL:
<!DOCTYPE html>
<title>Testing 1 2 3</title>
<p><a href="//google.com/">Linky</a></p>I'm saying that those who need to worry about such things should and the rest of us should not. Nothing more and nothing less.
http://dev.w3.org/html5/spec/Overview.html#the-base-element
And accordingly, adding `<base href="http://example.com/ >` to that test above seems to work well on modern browsers.