Re:How a new HTML element will make the Web faster
by TheAceOfHearts on Tuesday September 02, 2014 @12:38AM
(#8255859)
tl;dr: <picture> tag. It contains an <img> tag inside for backwards compatibility, and allows you to define multiple <source> tags for different sizes.
[ Parent
| on HN ]
Re:How a new HTML element will make the Web faster
by est on Tuesday September 02, 2014 @01:06AM
(#8255909)
Which is kinda lame IMHO. Why can't we use progressive JPEG, with offsets? The first rough scan for small size image, a second scan for normal image, a third scan for retina sized image?
One file, one URL, different offset for different dimensions, done.
Re:How a new HTML element will make the Web faster
by cbhl on Tuesday September 02, 2014 @01:30AM
(#8255960)
You may want to show a different icon with different viewport sizes. For example, compare the different sizes of the Google Calendar icon here:
http://setup.googleapps.com/Home/user-resources/google-icons...
You'll note the 16px icon uses square corners, while the other sizes have rounded corners.
There are other considerations as well, such as causing unintentional Moiré effects, and scaling DPIs in not-quite-powers-of-two (basically all of Android).
Re:How a new HTML element will make the Web faster
by Groxx on Tuesday September 02, 2014 @01:39AM
(#8255977)
Still doesn't solve the design-problem of showing e.g. a differently-cropped (or entirely different) image to different viewports.
Re:How a new HTML element will make the Web faster
by rrouse on Tuesday September 02, 2014 @04:47AM
(#8256407)
Doesn't that mean I would be downloading all of the image data and only using part of it?
Re:How a new HTML element will make the Web faster
by Sanddancer on Tuesday September 02, 2014 @05:46AM
(#8256648)
No. Part of the http spec is the ability to download only a specific range of bytes in a file.