doubledee Posted September 1, 2011 Share Posted September 1, 2011 Anyone care to explain to me - in English - what the *correct* difference between a URL and a URI is? (All I find online is gibberish and information is contradictory and just plain wrong...) Thanks, Debbie Quote Link to comment Share on other sites More sharing options...
jcbones Posted September 1, 2011 Share Posted September 1, 2011 "URI stands for Universal Resource Identifier and URL stands for Universal Resource Locator. Often times people use the terms interchangably, which is not entirely correct. A URL is a subset of the URI popular protocols. These are protocols (http://, ftp://, mailto:). Therefore all URLs are URIs. The term URL is deprecated and the more correct term URI is used in technical documentation. All URIs are means to access a resource on the Internet and are a a technical short hand used to link to the resource. URIs always designate a method to access the resource and designate the specific resource to be accessed." That puts it about as plain as you would want to get. Lots of different jargon out there, but this is clear and concise and to the point. A lot of other variables go with it, but this is the general breakdown. Quote Link to comment Share on other sites More sharing options...
doubledee Posted September 1, 2011 Author Share Posted September 1, 2011 "URI stands for Universal Resource Identifier and URL stands for Universal Resource Locator. Often times people use the terms interchangably, which is not entirely correct. A URL is a subset of the URI popular protocols. These are protocols (http://, ftp://, mailto:). Therefore all URLs are URIs. The term URL is deprecated and the more correct term URI is used in technical documentation. All URIs are means to access a resource on the Internet and are a a technical short hand used to link to the resource. URIs always designate a method to access the resource and designate the specific resource to be accessed." That puts it about as plain as you would want to get. Lots of different jargon out there, but this is clear and concise and to the point. A lot of other variables go with it, but this is the general breakdown. I already read that definition online. No, it isn't clear. What are examples of URL's? What are examples of URI's? Why do so many people say that using URL is always wrong because it no longer applies? Debbie Quote Link to comment Share on other sites More sharing options...
shlumph Posted September 1, 2011 Share Posted September 1, 2011 Every square is a rectangle, but not every rectangle is a square is to every URL is a URI, but not every URI is a URL. I think these pages may help, specifically the image on the top right of the page: http://en.wikipedia.org/wiki/Uniform_Resource_Locator http://en.wikipedia.org/wiki/Uniform_Resource_Identifier http://en.wikipedia.org/wiki/Uniform_Resource_Name What are examples of URL's? http://en.example.org/ http://www.google.com www.example.com/with/a/path.html 192.168.1.103 https://192.168.1.155 What are examples of URI's? urn:isbn:0451450523 The URN for The Last Unicorn (1968 book), identified by its book number. urn:isan:0000-0000-9E59-0000-O-0000-0000-2 The URN for Spider-Man (2002 film) identified by its audiovisual number. urn:issn:0167-6423 The URN for the Science of Computer Programming (scientific journal), identified by its serial number. www.google.com A URL of a website. 192.168.1.103 An IP address Quote Link to comment Share on other sites More sharing options...
doubledee Posted September 1, 2011 Author Share Posted September 1, 2011 So why do so many people online say using URL is wrong? From what I've just read from you, using URL is quite alright as long as you understand that it is a type of URI. So www.phpfreaks.com is both a URL and a URI, right? And presumably you could use the terms interchangeably in that case? Debbie Quote Link to comment Share on other sites More sharing options...
shlumph Posted September 1, 2011 Share Posted September 1, 2011 So why do so many people online say using URL is wrong? Not sure. So www.phpfreaks.com is both a URL and a URI, right? Yes. And presumably you could use the terms interchangeably in that case? Yes. URI is just more general, which is probably why most technical documents use it. AFAIK. Quote Link to comment Share on other sites More sharing options...
doubledee Posted September 1, 2011 Author Share Posted September 1, 2011 Okay. Anyone else care to chime in and enlighten me? Debbie Quote Link to comment Share on other sites More sharing options...
salathe Posted September 1, 2011 Share Posted September 1, 2011 So www.phpfreaks.com is both a URL and a URI, right? And presumably you could use the terms interchangeably in that case? URL is a sub-type of URI, so if something is a URL then it is also a URI. The other way around isn't always true: a URI is not always a URL. The example (www.phpfreaks.com) that you gave is not a URL since there is no scheme part (http). That example allows one to identify a resource (remember what URI stands for) but not a means of locating the resource (e.g. using the http protocol; remember what the L in URL means). Quote Link to comment Share on other sites More sharing options...
doubledee Posted September 1, 2011 Author Share Posted September 1, 2011 URL is a sub-type of URI, so if something is a URL then it is also a URI. The other way around isn't always true: a URI is not always a URL. The example (www.phpfreaks.com) that you gave is not a URL since there is no scheme part (http). That example allows one to identify a resource (remember what URI stands for) but not a means of locating the resource (e.g. using the http protocol; remember what the L in URL means). So "http://www.phpfreaks.com" is a URL? And "www.phpfreaks.com" is just a URI? Debbie Quote Link to comment Share on other sites More sharing options...
salathe Posted September 1, 2011 Share Posted September 1, 2011 So "http://www.phpfreaks.com" is a URL? Bingo. And because it's a URL, it's also a URI. And "www.phpfreaks.com" is just a URI? No, a URI is either a URL, a URN or both. This is none of them. Quote Link to comment Share on other sites More sharing options...
doubledee Posted September 2, 2011 Author Share Posted September 2, 2011 So "http://www.phpfreaks.com" is a URL? Bingo. And because it's a URL, it's also a URI. And "www.phpfreaks.com" is just a URI? No, a URI is either a URL, a URN or both. This is none of them. So what is "www.phpfreaks.com"? In the vernacular people would call it a "URL"... Also, what would you call the bolded part of this URL... http://www.mywebsite.com/articles/postage-meters-can-save-you-money Debbie Quote Link to comment Share on other sites More sharing options...
Alex Posted September 2, 2011 Share Posted September 2, 2011 Also, what would you call the bolded part of this URL... http://www.mywebsite.com/articles/postage-meters-can-save-you-money That's sometimes referred to as a "slug". Quote Link to comment Share on other sites More sharing options...
doubledee Posted September 2, 2011 Author Share Posted September 2, 2011 Also, what would you call the bolded part of this URL... http://www.mywebsite.com/articles/postage-meters-can-save-you-money That's sometimes referred to as a "slug". Where did that term come from? It sounds dirty, like a bug?! Yuck!! I renamed it in my database to "pretty_title" Debbie Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.