URL: Difference between revisions

Caterina (talk | contribs)
Caterina (talk | contribs)
Line 25: Line 25:
== Types of URL ==
== Types of URL ==


There are two types of URLs, Absolute and Relative.  
There are two types of URLs, '''Absolute''' and '''Relative.'''


The Absolute URL is a URL that is independent of other elements and points directly to an exact file location. For instance, "<big><code>mywebsite.com/images/homepage.jpg</code></big>" is an absolute URL, which specifies that the image file homepage.jpg is located in the images directory, under the mywebsite domain.  
The '''Absolute URL''' is a URL that is independent of other elements and points directly to an exact file location. For instance, "<big><code>mywebsite.com/images/homepage.jpg</code></big>" is an Absolute URL, which specifies that the image file homepage.jpg is located in the images directory, under the mywebsite domain.  
   
   
A '''Relative URL''' is a type of URL that is dependent on other elements and point to a directory or file in relation to the present directory or file. For example, "<big><code>../image/homepage.jpg</code></big>." In this, the first two periods (..) direct the server to move up one directory (the root directory), then enter the images directory and point to the homepage.jpg file. The main benefit of a Relative URL is that it allows a web master to make changes to the directory without the worry of breaking a file path.<ref>[http://blog.webhosting.uk.com/web-hosting/types-of-url-absolute-and-relative/ blog.webhosting.uk.com]</ref>
A '''Relative URL''' is a type of URL that is dependent on other elements and point to a directory or file in relation to the present directory or file. For example, "<big><code>../image/homepage.jpg</code></big>." In this, the first two periods (..) direct the server to move up one directory (the root directory), then enter the images directory and point to the homepage.jpg file. The main benefit of a Relative URL is that it allows a web master to make changes to the directory without the worry of breaking a file path.<ref>[http://blog.webhosting.uk.com/web-hosting/types-of-url-absolute-and-relative/ blog.webhosting.uk.com]</ref>