[whatwg] Issues concerning the <base> element and xml:base
mjs at apple.com
Sat Mar 1 17:12:24 PST 2008
On Mar 1, 2008, at 4:20 PM, Jonas Sicking wrote:
> Anne van Kesteren wrote:
>> On Sat, 01 Mar 2008 13:29:41 +0100, Jonas Sicking
>> <jonas at sicking.cc> wrote:
>>> Personally it's something I would be very reluctant to do. It
>>> would add a whole lot of code for basically no benefit for web
>>> developers. I have never heard of anyone that actually desired
>>> changing the base uri for all or parts of a page dynamically.
>> Note that the new base URI would only take effect once you actually
>> did something with a potentially affected object. For instance,
>> <img> would not start loading a new image if the base URI changes.
>> <img>.src = <img>.getAttribute("src") could start loading a new
>> resource however if the base URI changed since the initial load.
> Well, that was my intention with the initial proposal. But Hixie
> pointed out that "did something" is a very hard thing to define.
I'd propose that resolution is always done against the base in effect
at the time the URI is resolved. So changing the base would never
trigger a reload short of another action.
> For example on a <a href="...">, does the user hovering the node
If you display an absolute URI to the user at this time it should get
resolved against the current base, but since this is not a load, it
should get resolved again when the user clicks the link, if the base
> Does resizing the window count?
No, this does not resolve any URIs.
> Does removing the node from the DOM and reinserting it count?
For an <a> element this would not trigger any URI resolution. Nor for
an <img> element, since their loading is independent of whether or not
they are in the document. I'd guess it is the same for other elements
that may trigger a load, but I haven't done a careful review.
More information about the whatwg