1

In a job interview I was asked, what are the 2 slashes for in a URL address. I did not know and cannot find something about it.

http://stackoverflow.com
user2952265
  • 1,590
  • 7
  • 21
  • 32
  • 2
    They don't really mean anything. They just separate the scheme from the rest of the URI (although the colon does that well enough) – Bojangles Jan 04 '14 at 19:22
  • 6
    This question appears to be off-topic because it is about basic networking address syntax which can be found in your favorite search engine in less time than it took to ask the question here. – dotancohen Jan 04 '14 at 19:22
  • http://www.zdnet.com/blog/igeneration/double-slash-in-web-addresses-a-bit-of-a-mistake/3090 A bit of read :) – kevpoccs Jan 04 '14 at 19:23
  • The information is about three clicks away: http://en.wikipedia.org/wiki/URL. – Oliver Charlesworth Jan 04 '14 at 19:24
  • http://en.wikipedia.org/wiki/URI_scheme – Anoop Kanyan Jan 04 '14 at 19:25
  • 1
    possible duplicate of [Origin of "://" in many URI syntaxes](http://stackoverflow.com/questions/1388194/origin-of-in-many-uri-syntaxes) – unor Jan 05 '14 at 04:01

1 Answers1

4

Try reading this link http://en.wikipedia.org/wiki/Uniform_resource_locator and http://en.wikipedia.org/wiki/URI_scheme#Generic_syntax

The scheme name consists of a sequence of characters beginning with a letter and followed by any combination of letters, digits, plus ("+"), period ("."), or hyphen ("-"). Although schemes are case-insensitive, the canonical form is lowercase and documents that specify schemes must do so with lowercase letters. It is followed by a colon (":").

The hierarchical part of the URI is intended to hold identification information hierarchical in nature. If this part begins with a double forward slash ("//"), it is followed by an authority part and a path. If the hierarchical part doesn't begin with ("//") it contains only a path.

The authority part holds an optional user-information part, terminated with "@" (e.g. username:password@); a hostname (e.g., domain name or IP address); and an optional port number, preceded by a colon ":". The path part, if present, may optionally begin with a single forward slash ("/"). It may not begin with two slash characters ("//"). The path is a sequence of segments (conceptually similar to directories, though not necessarily representing them) separated by a forward slash ("/").

Historically, each segment was specified to contain parameters separated from it using a semicolon (";"), though this was rarely used in practice and current specifications allow but no longer specify such semantics.

Kanishka Ganguly
  • 1,252
  • 4
  • 18
  • 38