Forum Moderators: phranque

Message Too Old, No Replies

Absolute path relative path.

What consequences should one expect?

         

Alternative Future

1:35 pm on Mar 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I were to use [mydomain.com...] rather than images/pic.jpg in my <img src=…> would this lead to the server request slowing down due to the absolute path always requesting the domain each time it calls on an image? And is there any other consequences to be expected using this technique?
I know that relative paths i.e. images/pic.jpg is the standard way on coding an internal image path unless it is remotely hosted, but down to the fact I use an Java event processor along with a JSP template in my root directory it is causing some minor problems. It would be a much quicker fix to just use absolute paths rather than take the EP and template back to the drawing board, if I knew that there was no real issues to concern myself with…
Any help that can be shared on the matter is gratefully appreciated :)

Thanks in advance…

KR,

-gs

mat_bastian

1:45 pm on Mar 15, 2003 (gmt 0)

10+ Year Member



to my knowledge, the benefits of relative paths over absolutes are as follows:

1)they are quicker to type

2)they allow for smaller filesizes

3)they minimize the chance for error as there is less information to process

4)they make your site more portable in that if you ever need to change domain or server or keep your site in multiple locations, you don't need to recode or keep separate versions of one site.

Alternative Future

1:58 pm on Mar 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi mat_bastian,

Many thanks for that excellent reply...
I just had to check that no other server specific problems would occur, such as separate http requests slowing down the over-all performance.

4)they make your site more portable in that if you ever need to change domain or server or keep your site in multiple locations, you don't need to recode or keep separate versions of one site.

I can over-come this with the use of some Java methods in the JSP template.

KR,

-gs