Closed Bug 405889 Opened 17 years ago Closed 17 years ago

base href ought to hold for src tags (inline images, scripts) in the page.

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 249881

People

(Reporter: L.Wood, Unassigned)

References

()

Details

<base href=""> in the header is fine for setting relative offsets for links in the page, but doesn't work for inline images, which are done via <img src="">.

Is there a <base src=""> tag which would hold an identical url to base href to do the same thing for inline images and script src tags? Well, no. I'd argue that <img src=""> and other src tags should just obey the base href setting, since that way you can move a set of files somewhere else and have src tags just work as you'd expect.

Interestingly,

a. IE6 can't load either graphic on the test url given, somehow coming up with the invalid http:///Person... for the relative url free of base (yes, three slashes). Firefox at least manages one (the one starting with /, so skipping base dependence).

b. http://www.w3schools.com/tags/tag_base.asp
claims that base href can be used with inline images. As if.
It can - the part you (and w3schools' inadequate explanation) missed is that base's href attribute must be an absolute URI, not a relative one.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.