Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have read these pages


I know basic about URL,URN,URI! and little on their difference! but the thing I cannot understand is in a page like: http://www.bernzilla.com/item.php?id=100 which part is URL,URN and URI!
URI is whole part but URL and URN??
picture from wikipedia

Edit: from w3c.org:
a URL is a type of URI that identifies a resource via a representation of its primary access mechanism (e.g., its network "location"), rather than by some other attributes it may have.

from www.damnhandy.com:

it is now considered incorrect to use URL when describing applications.

Now is id an attribute?what about application part? is php an application?

share|improve this question
2  
This question has been asked on Stack Overflow a few times and got a good deal of attention and good responses: What's the difference between a URI and a URL? –  hippietrail Dec 21 '12 at 10:12
add comment

2 Answers

It is not the case that the URL you mention is composed of both a URL and URN part.

http://www.bernzilla.com/item.php?id=100 is both a URL and a URI.

Basically URIs are a superset of URLs and of URNs. There is some overlap between URLs and URNs as well.

A URI identifies a resource either by location, or a name, or both.

So any URL is a URI, any URN is a URI, but not every URI is a URL.

share|improve this answer
add comment

I think those articles explain quite well. To answer your question - all of this is a URL:

http://www.bernzilla.com/item.php?id=100

Each bit of it - http: www.bernzilla.com and so on has it's own name:

  • http: is the scheme
  • www is the sub-domain
  • bernzilla.com is the domain
  • com is the top level domain or TLD
  • (there could be a folder or path there, e.g. /dir/item.php but there isn't)
  • item.php is the page or filename which has an extension php
  • id=100 is the query string

I can see given that diagram from wikipedia why you're asking though. That diagram is saying there are two types of URI - URLs and URNs and the fuzzy bit in the middle is when something can be both.

share|improve this answer
    
Thanks for answer. I edited my question. can you take look again? –  undone Sep 2 '11 at 13:35
    
I don't understand that quote about describing applications and I can't see a comment where someone points that out. I'll update my answer to describe the separate parts. –  paulmorriss Sep 2 '11 at 13:53
    
@paul don't you mean URI in the first line? id=100 isn't a location, it's an indicator. –  DisgruntledGoat Sep 7 '11 at 14:37
    
I think I meant URL. With some sites if you change the id you get different "pages" in normal-speak. Reading the definition of resource on wikipedia I think a page is an example of a resource. –  paulmorriss Sep 7 '11 at 14:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.