W3C home > Mailing lists > Public > public-respimg@w3.org > September 2014

Re: Title of the spec may cause heartache

From: Odin Hørthe Omdal <odinho@opera.com>
Date: Tue, 23 Sep 2014 13:24:41 +0200
Message-Id: <1411471481.4082635.170723561.71A64B77@webmail.messagingengine.com>
To: Attiks <attiks@gmail.com>, Bruce Lawson <brucel@opera.com>
Cc: John Albin Wilkins <john@albin.net>, Christopher Schmitt <schmitt@christopher.org>, Jason Grigsby <jason@cloudfour.com>, public-respimg@w3.org
On Tue, Sep 23, 2014, at 12:51, Attiks wrote:
> Bruce,
> 
> We're using picturefill that adds support for srcset as well, so you'll
> get both. That's also the reason why http://scottjehl.github.io/picturefill/
> says to use srcset in the fallback image.

Then don't use it.


And please don't say that about browsers downloading two images, because
you are specifically talking about a javascript polyfill.  People will
believe you.  With the information you didn't add, this is a pure lie:

On Tue, Sep 23, 2014, at 08:43, Attiks wrote:
> I don't want to spoil it, but if you use an img with src and srcset, the
> image (src) will be prefetched by most browsers, resulting in 2
> downloads,

If I add some javascript that also puts a "?hey" behind every src it can
find, then that will probably make it incur a third load.  That's not a
problem with the spec.  Browsers supporting responsive images will only
take what they want, user agents not supporting it will just take the
src.  No problem; it's how it's meant to work.

The fallback behavior is *not* something to be afraid of.  It's in fact
just what we use on all the web today.  Let fancy new technologies be
just that, let browsers implement it when they want it, I advise agaist
using picturefill on something as important as Drupal.

It's not possible to fully polyfill responsive images, so you can choose
between two different fallbacks; show the main fallback image (this
should be the (*by far*) preferred one), or use e.g. picturefill to get
some of the functionality but with two picture downloads.

In fact, I think it's rather irresponsible of the picturefill website to
recommend people to use it (and in such a bad way without src).  I would
rather it said «you probably *don't* want this, just do without the
polyfill and let old browsers get your "src"».  (and probably some link
to why you shouldn't use it and rather make sure the fallback <img src>
works well)



Doing this wrongly could hurt the web.  Especially if something like
Drupal does it, since you don't have easy control to fix things again. 
Once it's in the wild, there's no going back from any mistakes.

-- 
  Odin Hørthe Omdal
  odinho@opera.com
Received on Tuesday, 23 September 2014 11:25:14 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:12:41 UTC