-1

This question has been asked many times before. But before you down-vote this please allow me to ask it in a slightly different way:

Of the following examples, which are URLs, which are URIs and which are both:

1. www.example.com

2. //www.example.com

3. http://www.example.com

4. www.example.com/myfolder/mypage.html

5. //www.example.com/myfolder/mypage.html

6. http://www.example.com/myfolder/mypage.html

7. myfolder/mypage.html

8. /myfolder/mypage.html

9. mypage.html

Any comment on which are URNs would also be welcome.

Henry
  • 6,843
  • 2
  • 32
  • 35
  • 1
    What about, for example, the existing answer in http://stackoverflow.com/questions/176264/what-is-the-difference-between-a-uri-a-url-and-a-urn/1984225#1984225 do you find confusing or unclear? – flup Mar 10 '15 at 20:06
  • This like all the other answers I've found here and on other sites is just a bit vague. There are a lot of good analogies and well researched commentary and this may be exactly what some folks are looking for, but for me unambiguous examples help a lot more. – Henry Mar 10 '15 at 20:43
  • 1
    Given your examples, are you perhaps actually more interested in the difference between URIs and URI-references? http://tools.ietf.org/html/rfc3986#section-4.1 – flup Mar 10 '15 at 21:12

1 Answers1

-1

I really think What is the difference between URI, URL and URN? should clarify your question. However, I'll try to answer your question directly..

  1. www.example.com

    none

  2. //www.example.com

    none

  3. http://www.example.com

    URL and URI

  4. www.example.com/myfolder/mypage.html

    none

  5. //www.example.com/myfolder/mypage.html

    none

  6. http://www.example.com/myfolder/mypage.html

    URL and URI

  7. myfolder/mypage.html

    none

  8. /myfolder/mypage.html

    none

  9. mypage.html

    none

Hope that helps a little.

Community
  • 1
  • 1
  • Yes thanks. With regard to No 4, it seems to me that it specifies a unique resource. There's only ever going to be one resource at `www.example.com/myfolder/mypage.html` across the entire Internet. I would have thought that was a URI - but not a URL because the protocol is not specified. Same for 1, 2 & 5? – Henry Mar 10 '15 at 20:47