tags:

views:

38

answers:

1

Hi there, as I strive to come up with the best methods name in my designs I struggle on a simple question but still very confusing to me.

There are two ways I use for retrieving stylesheets or javascript files:

<link href="/myProject/public/styles/master.min.css?v=1274382274" media="screen"    rel="stylesheet" type="text/css" />
<link href="http://mydomain.com/public/styles/master.min.css?v=1274382274" media="screen"    rel="stylesheet" type="text/css" />

<script type="text/javascript" src="/myProject/public/scripts/master.min.js?v=1274394222"></script>
<script type="text/javascript" src="http://mydomain.com/public/scripts/master.min.js?v=1274394222"&gt;&lt;/script&gt;

I know that http://[...] can be called as an URI (as specified by the difference between URI and URL)

but an href or src that specifies a path according to the document root of the server such as /myProject/public is different.

So what would be the best term when speaking of those two different href|src value's?

/myProject/public/[...]
http://mydomain.com/[...]
  • An URI since it specifies a location and an identification?
  • An URL? Not sure why
  • A path? A definitive no IMO
  • Another term, please specify and explain

My design is independant of both the href and src, otherwise I would just have used the two terms href and src, of course. So in summary, I need the term that specifies the above while speaking about both about the href and src.

Thanks!

+2  A: 

I believe the linked question perfectly answers your question. Nothing more to say. All URLs are URIs but not vice versa. Both of the examples you wrote all URLs (and consequently URIs too). The first is a relative URL and the second is an absolute URL. Both are URLs as they locate a resource. URNs are, for instance, URIs but not URLs. They identify a resource but provide no means to locate it.

Mehrdad Afshari