Re: Relative paths or absolute paths in links?



Le Lundi 27 octobre 2003, a 22:02, Jeff Waugh a ecrit :
<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).

Well, if I have no template and juste one website, this type of link is
useless, isn't it? (this is what I have in foundation-web).

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.

Nowhere if we use relative links :-) So I won't commit this change.

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. :-)

Ok, thanks.

Vincent

-- 
Les gens heureux ne sont pas presses.



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