|
What Is A URL (or URI)?
URL stands for Universal Resource Locator and is the address to a specific item (typically a web page, graphic or other file) located on the Internet. Every accessible Internet item has its own URL.
A URL looks like this:
http://www.ourhutch.com/examples/whatisaurl.html
That is the URL for the web page you are reading now. The first part (http:) indicates the protocol that is used to transfer the item contents (in this case, hyper text transfer protocol). The next part (//www.ourhutch.com/examples/whatisaurl.html) provides the server, directory and item path or route to the actual item (document, in this case).
Sometimes a URL is used to pass along information to the server where the item is located. You might see a long, complicated URL that looks something like this:
http://stores.ebay.com/ourhutch/plistings/list/all/dept6/index.html?dir=1&col=4&sotimedisplay=2
This one is for the Wizard's category in the Our Hutch eBay store. This part of it:
http://stores.ebay.com/ourhutch/plistings/list/all/dept6/index.html
is just like the previous URL we looked at, with a protocol section and a path section. This new one has a data section that looks like this:
dir=1&col=4&sotimedisplay=2
This data sections is separated from the protocol/path section with a question mark (?). We call this question mark a delimiter when it's used in this manner. The data section contains three parameters, separated from each other with ampersand (&) delimiters:
dir=1 & col=4 & sotimedisplay=2
Here is the whole URL but with the delimiters indicated in bold:
http://stores.ebay.com/ourhutch/plistings/list/all/dept6/index.html?dir=1&col=4&sotimedisplay=2
Don't let these long URLs confuse you. They are easy to understand when you know what the parts are.
URI stands for Universal Resource Indicator and it's just the more modern (more accurate) name for URL. You will see it used from time to time as it becomes more popular, so don't be confused.
It's always the right time to use good code!
[ back | top ]
|