[whatwg] Proposal: Extension to the base element

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20091109/d4e7ab7e/attachment-0001.htm>

Received on Monday, 9 November 2009 01:43:49 UTC