[thelist] [html] - base

Lee kowalkowski lee.kowalkowski at googlemail.com
Sat Feb 10 16:11:25 CST 2007

On 10/02/07, Pierre-Henri Lavigne <lavigne at getphuture.com> wrote:
> For a released site, we have to use atm a <base
> href="http://www.essonne.fr" />
> But in the current work is used relative links, not absolute.

Absolute links are unaffected by the Base element.  The Base element
is only applied to relative URIs in your document (i.e. links that do
not start with a scheme or a double-slash).

> 2 errors
> on the log in two weeks (it could be worse i know) :

Whose logs?  Your site's or essonne.fr?  Or are they both the same site?

> - - [01/Feb/2007:18:21:55 +0100] "GET
> /le_departement/vos_elus/les_conseillers_regionaux/le_departement/vos_elus/les_senateurs/
> HTTP/1.1" 404 10090
> "http://www.essonne.fr/le_departement/vos_elus/les_conseillers_regionaux/"
> "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser; Avant
> Browser; .NET CLR 1.1.4322)"

So, from les_conseillers_regoinaux, you were supposed to go to
les_senateurs, in the *same* directory?

What is the Base URI set to on the les_conseillers_regoinaux page, and
what HREF do you have for the les_senateurs page?

It looks to me that the Base URI was
and the HREF was le_departement/vos_elus/les_senateurs/.

> In the past we used one time a base href too for misc. reasons but the
> links inside the page were absolute and it seems we hadn't such problems.

If the links were absolute, the Base element would not have applied to them.

> I read on webdevout the base was not supported by every UA (average 85%).

Hmm, just looked that up, it actually says (in a very confusing way)
that all the tested browsers only supported 83% of base elements (what
on earth? - most probably the different styles of HREF attribute value
you can theoretically use).  Looks like a red herring to me.

> Any ideas / informations about it ?

Personally, I've never found myself in a situation where a Base
element is the right solution.  Perhaps if I wanted to be easily
mirrored, or if I was doing the mirroring, argh, one or the other,
can't think!

I would be intrigued if there was a mainstream browser that didn't
support the Base element at all.  How I see it, all browsers need to
calculate absolute URIs of the relative ones.  The Base element just
allows the document author to override one of the parameters used in
that calculation.  It wouldn't be any trouble to implement.

More information about the thelist mailing list