httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pete Nelson" <>
Subject Re: relative vs absolute URL's / CPU processing overhead
Date Tue, 26 Mar 2002 14:07:13 GMT
One other suggestion, and it will help you move these pages from
development to production, is to use a root-relative URL.  Instead of 
<img src="http://www.mywebsite/images/somegif.gif">, use  <img

Our website is maintained by several departments, each with their own
little piece.  When their linking to content that is only used by their
department, the use the relative URL (images/somepic.gif,
../images/etc.gif).  When they use a resource shared by everyone, they
use the root-relative (/css/mainstyle.css (in which all links must be
root-relative to work), /images/banner.gif).

The biggest advantage I've found is that we can fully test our backup
server which normally (has always) been at a different IP address.  It
also makes moving files from one host to another a breeze.

Pete Nelson, Web Developer

>>> 03/26/02 12:31AM >>>
On 3/25/02 9:07 PM, "Sivakatirswami" <> wrote:

> I am trying to set a development policy that will impact coding ...

Write it in pencil as it will likely change once you figure out what
want to do...

> The issue is whether use of absolute URLs to reference images and
> *.html documents  in the same public_html directory increases CPU
> or not...  in terms of time taken for Apache to serve images for that
> or serve/reference documents on the same site from links on the

There is no measurable impact on the server with regard to Absolute or
Relative URLs - but there could be an issue where your server slows
down if
you are using mod_spel and there are thousands of similar filenames in
directory in question.

> *.html page  three directory levels deep... if we use
> <img src="http://www.mywebsite/images/somegif.gif" > vs
> <img src="../../../images/somegif.gif">
> do 25 instances of the former slow down serving the page vs 25
instances of
> the latter?

Huh?  What's wrong with just a standard:

<img src="/images/somegif.gif">


> Of course, the issue of portability, being able to view the site
> under development on the LAN without opening connections to the ISP
> outside the LAN where the domain actually lives etc. obviously puts
> URL's in the lead for preferred usage... but the overhead required to
"go to
> the trouble" to figure out what directory level a document will be on

???  Is this a first site design for you or your team?

> levels wrong where "../../image/some.gif"  should really be
> "../../../image/some.gif"

Sounds like you are not mirroring your development...  I host on my laptop - then just mirror updates.

If you have multiple developers then I would suggest an internal
host then publish the changes to the production host.

> And besides the CPU overhead question I would like any input from
> experienced web masters on this issue... if you have "strong
feelings" about
> this subject then I would like to know what they are what led you to
> conclusions.

Well, if you must know ...

1)  get a Mac running MacOS X
2)  get BBEdit
3)  Sleep better knowing you're now 100% more effective.

BTW - CPU time will not matter after you consider where your clients
are and
what technology they are using to access your site.  My point being: 
it easier for your clients - they will like you more if you think of

-Sx-  :]

The official User-To-User support forum of the Apache HTTP Server
See <URL:> for more info.
To unsubscribe, e-mail: 
For additional commands, e-mail: 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message