[whatwg] defer on style, depends

Garrett Smith dhtmlkitchen at gmail.com
Sun Feb 8 21:15:36 PST 2009

Sometimes a document's resources are not needed all at first. For
example, a script that is not needed until after the document is
parsed can be given the defer attribute (for browsers that support

External css can also be a blocking download. Scripts have defer
attribute, but style and link do not.

The proposal is to add to defer to style, and link.

This will allow browsers to not block on those elements.

It would be more complete to have a depends attribute on script and style.

<script depends="a b c"></script>

Where the depends is id-list [CS], space separated values of element IDs.

It would also be useful to have a way to dynamically load scripts,
other than createElement("script").


More information about the whatwg mailing list