W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2009

[whatwg] Proposal: Extension to the base element

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Mon, 9 Nov 2009 11:04:13 -0500
Message-ID: <7c2a12e20911090804x33d008dl46aec0d177d44578@mail.gmail.com>
On Mon, Nov 9, 2009 at 4:43 AM, Fabian Freiburg
<f.freiburg at googlemail.com> wrote:
> The "base" element is very helpful. Trouble is that it affects all relative
> links and "src" attributes. Especially for the "src" attributes it would be
> very useful if it could define a context or media type to which it belongs.
> With this it would be possible to define a "base" URI fore. g.? images,
> javascripts or stylesheets. Furthermore it would be very easy to use a CDN
> for serving static media files.

Why can't you just use absolute URLs here, or regular relative URLs?
If your page is dynamically generated, you can have the script add the
appropriate domain to the URLs.  If your page is static, then you're
most likely hosting it on the CDN too, in which case you can just use
normal relative URLs.  Extending <base> to handle this seems
unnecessarily complicated and fragile.
Received on Monday, 9 November 2009 08:04:13 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:18 UTC