Re: file/path names

by Eric Meyer <emeyer(at)theopalgroup.com>

 Date:  Thu, 26 Apr 2001 14:26:42 -0400
 To:  Timothy Luoma <luomat+lists+hwg(at)peak.org>,
HWG-Basics <hwg-basics(at)hwg.org>,
HWG-Style <hwg-style(at)hwg.org>
 References:  peak
  todo: View Thread, Original
[apologies for the off-list copy, but it usually takes the HWG 
servers about two hours to get my messages back to me, so I don't 
know if a similar delay exists for everyone else or not]

At 11:08 -0700 4/26/01, Timothy Luoma wrote:

>Eric: I am about 6 chapters into your great CSS book!  Read most of it on
>the flight today :-)

    I'm glad you're enjoying it!

>Question:  When folks refer to an absolute URL, do they generally mean
>http://site/path/to/file or /path/to/file?

    The former.

>I would think that using http:// would not be preferable, and that using /
>would be better/more portable.  Better because the the browser doesn't
>have to think that it is making a connection to another site (another DNS
>lookup) and better because if you change your domain name, etc, you won't
>have to update the URLs.

    All very true and sharply observed, and if NN4.x didn't have this 
flaw we could all happily do as you suggest.  If your boss/client 
demands that "it has to look the same in NN4.x" then you have to deal 
with the problems that brings along.  Not least of which is that your 
odds of getting a pixel-precise rendering of a page in all v4, v5, 
and v6 browsers are roughly equivalent to that of the Messiah 
emerging from a flying saucer onto Times Square dancing an Irish 
jig[1].

>Is there a "best practice" here?

    It depends on your tolerance for cross-browser display 
differences.  If you're okay with NN4.x users getting something which 
falls short of what you envisioned, then the best practice is 
whichever URL style you prefer.  If you can't accept those 
differences, then you're stuck with the choices I mentioned earlier: 
either make all your URLs absolute, or else keep your HTML and CSS 
files in the same directories-- and possibly put the images in the 
same directory.  Given those options, I pretty much always go with 
absolute URLs, but that makes sense for the kinds of projects I do. 
It may make as much or more sense to try it the other way.


[1] Apologies to Elliott S. Maggin for stealing that image.

--
Eric Meyer
Internet Applications Manager        e-mail: emeyer(at)theopalgroup.com
The OPAL Group / Technical Services   voice: (216) 986-0710 ext. 21
  http://www.theopalgroup.com/           fax: (216) 986-0714

HWG hwg-style mailing list archives, maintained by Webmasters @ IWA