- From: Bruce Lawson <brucel@opera.com>
- Date: Thu, 5 Mar 2015 16:00:35 +0000
- To: Paul Deschamps <pdescham49@gmail.com>
- Cc: Jason Grigsby <jason@cloudfour.com>, "public-respimg@w3.org" <public-respimg@w3.org>
On 5 March 2015 at 14:56, Paul Deschamps <pdescham49@gmail.com> wrote:
> If it comes down to the double download issue Chrome currently supports a
> CSS only solution replacing the IMG src so the Double download doesn't exist
> there. Would it not be better to focus on that kind of a solution for the
> other browsers? Clearly someone else is in agreement with me here as it's
> already supported in Chrome.
Well, the foo {content: url();} construct wasn't made for responsive
images; one of its use-cases is for "image replacement" eg
<h1>Acme Ltd</h1>
h1 {content: url(logo.jpg); }
So browsers that had images turned off/ CSS off/ screenreaders would
get the textual content of the h1, and visual browsers would see the
equivalent logo. I wrote this up in 2008
https://web.archive.org/web/20080914185604/http://my.opera.com/ODIN/blog/css-3-image-replacement
Having an <img> with no src attribute, then "replacing" it in CSS
does "work", but it means that the image downloads much later than
<img src="blah.jopg"> because the preloader has nothing to fetch.
Stopping the preloader doing its stuff results in more philosophically
satisfying code, I agree. But it's at the expense of users - as Steve
Souders said "I think preloading is the single biggest performance
improvement browsers have ever made".
bruce
Received on Thursday, 5 March 2015 16:01:03 UTC