Re: Full versus relative URLs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Here's a question related to my last post. When specifying a link in a
> HTML file (like to the css or an image file), there are two ways of
> doing it. One is to simply include the relative path to the file
> (relative to the doc root), like:
>
> /graphics/my_portrait.gif
>
> Or you can include the full URL, like:
>
> http://example.com/graphics/my_portrait.gif
>
> My casual observation seems to indicate that the former will load faster
> than the latter. But has anyone done any benchmarking on it?
>

Hi Paul,

There is no difference in speed.
The difference is in manageability.
Copying the scripts to another domain and you're using full url for
your src and href when referring to local images or css or pages, will
give you trouble and you must change all of them to your new domain.

Virgil
http://www.jampmark.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux