- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
absolute path
September 3, 2015
Absolute paths are called so because they refer to the very specific location, including the domain name. The absolute path to a web element is also often referred to as the URL.
Absolute path contains the root directory and all other subdirectories that contain a file or folder.
Absolute path differs from a relative path. Relative Path is a path to a given file or directory starting from another file or directory.
Below are some examples of absolute and relative paths.
Windows absolute path:C:Windowscalc.exeWindows non absolute path (relative path):
calc.exe
In the above example, the absolute path contains the full path to the file and not just the file as seen in the non absolute path. In this example, if you were in a directory that did not contain "calc.exe" you would get an error message. However, when using an absolute path, you can be in any directory and the computer would know where to open the "calc.exe" file.
Linux absolute path:/home/users/cyourdomain/public_html/cgi-bin
Linux non absolute path (relative path): public_html/cgi-bin
In this example, the absolute path contains the full path to the cgi-bin directory on that computer. Since most users do not want to see the full absolute path to their personal directory, the relative path is shown. Use the pwd command to see the absolute path.
Internet URL absolute path:Internet URL non absolute path (relative path):How to download a template
how-download-template.html
The first difference you notice between the two different types of links is that absolute paths always include the domain name of the website, including www., whereas relative links only point to a file or a file path. When a user clicks a relative link, the browser takes them to that location on the current site.