3

We always see reserved characters like /, #, & in URLs; but what are the intended usages of less common ones like @, [, ], ,?

I haven't been able to find a good explanation of what these characters are reserved for.

See Wikipedia and section 2.2 here.

Adam Biggs
  • 3,527
  • 4
  • 23
  • 27

2 Answers2

4
  • @ and :: for HTTP login data for a host (http://john:password@example.com)
    • : also separates the host from the port (http://example.com:1337)
    • note that @ is obviously used in the path of mailto URIs, but allowed in the HTTP URI path, too
  • [ and ]: for CURIEs ([db:resource/Albert_Einstein])
  • ,: could be used to delimit (query) parameters
  • ;: see this question: What is the semicolon reserved for in URLs?
Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
0

@ is for adding username and password to the url, so you could do http://username:password@host.com

AlwaysBTryin
  • 1,924
  • 12
  • 7
  • Speculation on the rest: precautionary removal of characters they expected this and other protocols to use later, even without a particular use in mind. The RFC says `+`, `,`, and `$` are reserved for query strings, but no use is specified. I've seen brosers that handle these characters without incident. – AlwaysBTryin Nov 02 '12 at 18:51