I'd suggest using an attribute over a type specifier too. Not only does it
have the problem Marius spotted, but if you specified a type attribute then
you have much more difficulty displaying content of the same type from both
a CDN and dynamic user content in the same page (such as in a social
networking site, displaying user-uploaded images from one location and the
static images for the site layout from a CDN).

Other than that, I think this would be a good addition that would make
<base> much more usable in dynamic sites.

2009/11/9 Marius Gundersen <gunder...@gmail.com>

> 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.
>
> Marius Gundersen
>
>
> On Mon, Nov 9, 2009 at 8:43 PM, Fabian Freiburg <f.freib...@googlemail.com
> > wrote:
>
>> Dear list!
>>
>> DISCLAIMER
>> 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.
>>
>> PROPOSAL
>> 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. 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"
>> element.
>>
>> Please let me know what you think about it.
>>
>> Regards,
>> Fabian
>>
>>
>

Reply via email to