"//" should indicate a URL
11–20 of 28 posts
Re: "//" should indicate a URL
#12Re: "//" should indicate a URL
#13The // 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/
Re: "//" should indicate a URL
#14The // 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/
The problem with this is that browsers that are older than IE8 don't support it, so if you're still targeting those users you're SOL on this method.
I don't have a copy of IE6 to test on at the moment, but what makes you think IE8 is required for relative protocols?
Re: "//" should indicate a URL
#15The // 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
#16Earlier quoted context omitted.
The problem with this is that browsers that are older than IE8 don't support it, so if you're still targeting those users you're SOL on this method.
I've used this technique since 2006 or so with IE6. The only concern I know of relates to using odd port numbers without a protocol in IE (but I don't think this is a concern if the protocol is relative). At the time, every other browser tested worked as well (not that that was much of a shock). I don't have a copy of IE6 to test on at the moment, but what makes you think IE8 is required for relative protocols?
Re: "//" should indicate a URL
#17http://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.
Re: "//" should indicate a URL
#18http://bits.blogs.nytimes.com/2009/10/12/the-webs-inventor-r...
Re: "//" should indicate a URL
#19Earlier quoted context omitted.
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…
HTML Base tag is your friend. http://www.w3schools.com/TAGS/tag_base.asp
Re: "//" should indicate a URL
#20I don’t know why everybody is talking about the technical meaning of //coca-cola, as that’s kind of irrelevant. Us web developers will of course still be typing the full http://coca-cola, as we always have.