Re: Full versus relative URLs
| From: | Michael A. Peters | Date: | Wed, 18 Feb 2009 18:31:45 +0000 |
| Subject: | Re: Full versus relative URLs | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-288555@lists.php.net to get a copy of this message | ||
Johnny wrote:
Hi Thodoris, In my opinion, the best use is to include your file with relative urls, like : <img src="/path/to/img.jpg" />I believe that it best. Including the hostname use to cause a dns lookup in some browsers which made it slower but I don't believe that is the case anymore. Doing the full path relative to document root though means it does not break when you move the page in your hierarchy.