On 21 March 2012 17:41, Brion Vibber brion@pobox.com wrote: ..
'Crazy' methods might include something like this inline:
<script>document.write('<' + 'img data-svg-src="//foo.svg" data-png-src="//foo.png">')</script>
<noscript><img src="//foo.png"></noscript>
and a DOM-ready-time fixup to set the 'src'. This feels ugly though, and delays start of image loading a bit (though we'd probably be loading styles mostly first?)
-- brion
Why I can't be just something like this (withouth any noscript, script or document-write thing)? <img src="//foo.png" data-svg="//foo.svg">
Its because will not validate or some browsers will ate data-svg?