"//" should indicate a URL
skyb.us
"//" should indicate a URL
1–10 of 28 posts
Re: "//" should indicate a URL
#2See:
Re: "//" should indicate a URL
#3The // prefix is actually used for protocol-relative URLs. So //google.com leads to https://google.com on a page with SSL, and it leads to http://google.com on an unencrypted page. See: http://nedbatchelder.com/blog/200710.html#e20071017T215538 http://paulirish.com/2010/the-protocol-relative-url/
A "//" link in an HTTPS site would be required to be the same protocol anyway. It's only the spdy->http fallback that could prove to be a nuisance.
Re: "//" should indicate a URL
#4Plus `//` is already used as a protocol agnostic way of accessing resources in HTML.
Re: "//" should indicate a URL
#5If that's the case, why bother with the // at all? Why not just assume, as most browsers already do, that there's an inferred http:// at the beginning of whatever the user types in the address bar?
(EDIT - I see that he's talking about how we would refer to URLs in things like print advertisements. Cute idea, but given the ubiquity of web addresses in mass media, and the time it takes for the public to learn anything new, it still sounds like a solution in search of a problem. The average American is still not sure how Twitter works, or what it means when they see a @name or a #tag.)
Re: "//" should indicate a URL
#6The // prefix is actually used for protocol-relative URLs. So //google.com leads to https://google.com on a page with SSL, and it leads to http://google.com on an unencrypted page. See: http://nedbatchelder.com/blog/200710.html#e20071017T215538 http://paulirish.com/2010/the-protocol-relative-url/
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:
Testing 1 2 3
Re: "//" should indicate a URL
#7The // prefix is actually used for protocol-relative URLs. So //google.com leads to https://google.com on a page with SSL, and it leads to http://google.com on an unencrypted page. See: http://nedbatchelder.com/blog/200710.html#e20071017T215538 http://paulirish.com/2010/the-protocol-relative-url/
Conversely, the protocol bit is relevant whenever your link is not domain- or protocol-relative, or when you can't be sure. 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…
Re: "//" should indicate a URL
#8The // prefix is actually used for protocol-relative URLs. So //google.com leads to https://google.com on a page with SSL, and it leads to http://google.com on an unencrypted page. See: http://nedbatchelder.com/blog/200710.html#e20071017T215538 http://paulirish.com/2010/the-protocol-relative-url/
// has another meaning in XML XPath, a language for navigating XML documents. // selects nodes anywhere in a document. For example, //p would select all paragraphs in an XHTML page.
Re: "//" should indicate a URL
#9The // prefix is actually used for protocol-relative URLs. So //google.com leads to https://google.com on a page with SSL, and it leads to http://google.com on an unencrypted page. See: http://nedbatchelder.com/blog/200710.html#e20071017T215538 http://paulirish.com/2010/the-protocol-relative-url/
Conversely, the protocol bit is relevant whenever your link is not domain- or protocol-relative, or when you can't be sure. 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…
Re: "//" should indicate a URL
#10http://www.google.com and https://www.google.com have two entirely different meanings when you get right down to it. Plus `//` is already used as a protocol agnostic way of accessing resources in HTML.