Which type of path should I use?
Introduction
Dreamweaver can create links in two ways, site root-relative or document-relative. This TechNote will outline the major advantages and disadvantages of each type.For a description of both,see Different path types (TechNote 15595).
Note:If you're unsure, we recommend using document-relative paths, which is the Dreamweaver default. Document-relative paths are arguably easier to manage.
Document Relative
Advantages
| |
Document relative paths preview better locally. For more information,see Why do my links stop working after previewing the first page? (TechNote 15625). |
| |
The levels of the folder structure above the two files can be changed, and the paths will still work. This means you can take a site that is completely contained within a folder, and move it to another folder. All the paths within such a self-contained site will still work. |
Disadvantages
| |
If either the source or destination file is moved, the path is broken. |
Site Root Relative
Advantages
| |
If the source file is moved, the path remains intacts. Moving the destination file, of course, will still break the path. |
Disadvantages
| |
Site root-relative paths do not preview perfectly locally. There is no 'site root' locally, so to preview site root-relative paths in the browser, Dreamweaver simulates a site root by passing additional information to the browser. Issues with this simulation, which is necessarily limited, are described in:Why do my links stop working after previewing the first page? (TechNote 15625). |
| |
The entire folder structure on the server (up to the site root) must remain unchanged, or paths will break. |
Additional information
For more details about paths in Dreamweaver, please see:
| |
For help determining when you would choose one path type over another, seeDifferent path types (TechNote 15595). |
| |
If you are experiencing problems following site root-relative paths after uploading to the server, see Why do my site root-relative paths break on the server? (TechNote 15609). |
| |
If you are experiencing problems following site root-relative paths when working locally, see Why do my links stop working after previewing the first page? (TechNote 15625). |
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
