Benx Blog

十一月 25, 2007

Diigo Diary 11/25/2007

Filed under: Diigo Diary — benxshen @ 8:37 上午

Ajaxian » URI vs. URL: What’s the difference?  Annotated

    I think simplest explanation works best:

    URI identifies. URL locates.

    or

    URI is a name. URL is a location.

      You got it all wrong. It is not about if a URI is a name is a locator or not. Or if the URI has a file extension or not. (URI never has the concept of file extension, it is that you think it has a file extension. ). It is about if a URI is bound with a network protocol. In other words, if you can get something back from the URI. W3C didn’t realize this earlier. Now, the term URL and URN is deprecated because the distinction is arbitrary.

      Just use URI from now on.

      See the URI spec http://www.ietf.org/rfc/rfc3986.txt.

        I agree, the article is misleading. A URI merely gives a resource a name and doesn’t say where you’ll find it. The same resource can be found at multiple locations (without regard to filename extension). A URL tells you “if you go here, you’ll find the resource” without regard to its name. However, the URL can also be used as a URI.

        I try to explain the difference using examples with made-up schemes:

        fuel:coal = URI (identifies/names the resource)
        mine:US-PA-NewEagle-MapleCreekMine = URL (specifies an address/location)

        food:Beef-Bowl = URI
        restaurant:HK-Central-Yoshinoya = URL

        blog:Ajaxian = URI
        website:www.ajaxian.com = URL

          發表迴響 »

          仍無迴響。

          RSS feed for comments on this post. TrackBack URI

          發表迴響

          在下方填入你的資料或按右方圖示以社群網站登入:

          WordPress.com Logo

          您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

          Twitter picture

          您的留言將使用 Twitter 帳號。 登出 / 變更 )

          Facebook照片

          您的留言將使用 Facebook 帳號。 登出 / 變更 )

          Google+ photo

          您的留言將使用 Google+ 帳號。 登出 / 變更 )

          連結到 %s

          在WordPress.com寫網誌.

          %d 位部落客按了讚: