News for hackers. Stuff that matters.
Re:Ask HN: Why does a url use ://? by makecheck on Monday August 31, 2009 @02:38PM (#796452)
Technically, not all of them do; "<schema>:" is the common prefix, and everything else depends on the URL type.

See: http://www.ietf.org/rfc/rfc1738.txt

In particular, section 3.1, 'The scheme specific data start with a double slash "//" to indicate that it complies with the common Internet scheme syntax.'. So it is used by URLs that require any of this information: "//<user>:<password>@<host>:<port>/<url-path>".

Re:Ask HN: Why does a url use ://? by sh1mmer on Monday August 31, 2009 @03:14PM (#796511)
An example of this is mailto:[email protected] this is still totally valid, but email addresses don't use the // notation for nodes.
Re:Ask HN: Why does a url use ://? by crux on Monday August 31, 2009 @02:55PM (#796482)
I should note that both Safari and Firefox understand the URL 'http:news.ycombinator.com/item?id=796434' as well.
Re:Ask HN: Why does a url use ://? by there on Monday August 31, 2009 @03:08PM (#796500)
but only in the url bar; both turn a url like that into a relative url when used in an img src, for example.