[whatwg] Proposal: Extension to the base element
gundersen at gmail.com
Mon Nov 9 03:26:34 PST 2009
One problem with the first proposal is that you don't know the mimetype of
the content before you load it. Just because it ends in .gif does not mean
it is a gif file (eg, using GD a .php file could be a GIF image).
Instead of using class, maybe the rel attribute would fit better.
On Mon, Nov 9, 2009 at 8:43 PM, Fabian Freiburg
<f.freiburg at googlemail.com>wrote:
> Dear list!
> I've never used a list before and I've never posted a proposal, so please
> be patient with me if I'm doing something wrong.
> 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,
> for serving static media files. There are probably some more advantages.
> There are different ways to implement this feature: One idea is to use a
> "content" or "type" attribute, where the MIME type to which the "base"
> belongs can be defined. For example the following "base" would affect all
> GIF images:
> <base href="http://example.com/media/images/" type="image/gif">
> Another idea is to use some kind of tagging, which would mean more
> flexibility. For example:
> <base href="http://example.com/media/images/" class="images cdn gif">
> Each element using one of the classes will belong to the relevant "base"
> Please let me know what you think about it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg