#anchors incompatible with ?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Using <base href="http://example.net /"> is it then true that one can
forget about using <a href="#anchor">?

I.e., one can no longer give users a way to jump around to different
anchors within the document, short of spelling out the full
href="http://..../this_doc.html#anchor", even though it merely refers to
a paragraph further down, lest our user end up at
http://example.net/#anchor ?

Re: #anchors incompatible with ?

jidanni@jidanni.org wrote:

Quoted text here. Click to load it

In practical terms it is, since the base element implies that the relative
URL "#anchor" means "http://example.net/#anchor ", so all your same-document
links would turn to links that refer to locations inside the page
"http://example.net ". Once you have set the base address with the base tag,
there is no way to change it any more (with HTML).

The <base href="..."> element just establishes a shorthand notation, so to
say. You can always dispense with it by using absolute addresses, and you
can always override its effect by using absolute addresses. It may get
clumsy in some situations, especially if you expect to move pages around.
Then you need authoring software, such as a preprocessor, that can manage
addresses better.

Quoted text here. Click to load it

Well, I guess that's a longer way of expressing it.

Quoted text here. Click to load it

The same question was asked and answered four years ago, and nothing has
changed in this respect. (The page seems to belong to a site that
masquerades Usenet discussions as "Velocity Reviews" content.)

Yucca, http://www.cs.tut.fi/~jkorpela/

Site Timeline