absolute links always start from the root website
/portal/images/myImage.png
relative links always start from the position of this page
../images/myImage.png
it's all about you when you use these approaches because I like to copy / do end-to-end web applications from server to server, and sometimes place them in other subfolders, I prefer to use relative links more than absolute ones.
and in one domain root I always have several subfolders and some default files, for example:
- /site
- /portal
- /post office
- / iphone
- default.aspx
- robots.txt
- sitemap.xml
and inside everyone who has
- / Css
- / Js image
- files.aspx
instead of having css in the root folder that contains all the CSS files for all supporting applications, for example, I always prefer to have everything in one place, I better move it to another place.
If you tend to create a web application to be persistent in this place, there is no one warm to use absolute paths, it is a matter of taste, not the best practice.
HTML in the letter
This is the place where you need to have the full path http://www.mydomin.com/images/myImage.png
hope this helps :)
source share