Re: Relative paths or absolute paths in links?



<quote who="Vincent Untz">

I'm playing with the new foundation web site branch, fixing some links.
We had lots of old links looking like href="http://foundation.gnome.org/";
or href="/" or href="../".

The first type is clearly wrong.

Not always; in some modules, we're going to have multiple websites, so you
would want to use explicit domain links in template source (or we'll have to
get into crazy domain variable stuff, which I don't think we should bother
with).

But I was wondering what is better between the second one and the third
one. I changed evilsedhack to do a s,\$HTTP_PREFIX,$ROOT/g and so absolute
paths like href="$HTTP_PREFIX/" would be ok.

Cool, though for interest's sake, where did you need to use these kinds of
links (particularly to $ROOT) in the content area? Would like to avoid that
where we can.

I suppose relative links are clearly recommanded, but I'd like to hear
that from someone with some authority :-)

Yes, definitely, 100%, use relative links as much as possible. :-)

- Jeff

-- 
linux.conf.au 2004: Adelaide, Australia         http://lca2004.linux.org.au/
 
  "Whoever wrote [the Twisted documentation] uses a vivid and interesting
         style of prose which triggers pleasure." - Francois Pinard



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