WebKit has added native support for the 'srcset' attribute on <img>
elements[1]. This means that future versions of Safari (and hopefully
Chrome) will automatically load high-resolution thumbnails in MediaWiki
pages when using a high-density display.

[1]
https://www.webkit.org/blog/2910/improved-support-for-high-resolution-displays-with-the-srcset-image-attribute/

We added 'srcset' entries to MediaWiki image output last year, along with
JavaScript fallback code to handle existing browsers. New browsers with
native support will have three advantages over the previous behavior:

1) Works even with JavaScript off.
2) Avoids extra network transfers by only downloading the right size images
for your screen.
3) Avoids brief 'flash' of low-resolution thumbnails before the JavaScript
triggers.

I've confirmed on a current WebKit nightly on my Retina MacBook Pro that
this works as expected -- our fallback code automatically disables itself
and the native support handles things without a hitch!

After a few months this feature should trickle down to release versions of
Chrome and Safari on mobile devices and laptops, so everybody will get
slightly smoother page loads on their iDroids. :)

-- brion
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to