W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

[whatwg] <picture>, `img set`, and polyfills

From: Mathew Marquis <mat@matmarquis.com>
Date: Mon, 14 May 2012 16:17:05 -0700
Message-Id: <DE497CE4-2B16-4602-AABB-8841555E6F14@matmarquis.com>
To: whatwg@lists.whatwg.org
It’s worth noting that a practical polyfill may not be possible when using `img set`, for reasons detailed at length elsewhere:
http://www.alistapart.com/articles/responsive-images-how-they-almost-worked-and-what-we-need/
http://www.netmagazine.com/features/state-responsive-images

Long story short: attempting to write a polyfill for `img set` leaves us in the exact situation we were in while trying to solve the issue of responsive images strictly on the front-end. We would be saddling users with a redundant download—first for the original src, then for the appropriately-sized source if needed. 

Where the new element would be all but ignored by existing browsers, efficient polyfills become possible. In fact, two `picture` polyfills exist today: http://wiki.whatwg.org/wiki/Adaptive_images#Functional_Polyfills

Thanks,
Mat Marquis
Received on Monday, 14 May 2012 23:17:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT