Earlier quoted context omitted.
Because it is way more verbose and does not address the pixel density case.
But pixel density is a property of the media, which should be dealt with by media queries.
First draft of HTML img srcset for responsive images
11–20 of 79 posts
Re: First draft of HTML img srcset for responsive images
#12Previous discussion about this by developers (170+ comments) who have been discussing Responsive Images in a W3C Community Group - http://www.w3.org/community/respimg/2012/05/11/respimg-propo...
Re: First draft of HTML img srcset for responsive images
#13Re: First draft of HTML img srcset for responsive images
#14Earlier quoted context omitted.
But pixel density is a property of the media, which should be dealt with by media queries.
Querying the pixel density of the device is not the same as describing the pixel density of the resource. This has been a common misconception in the discussion of this feature.
Re: First draft of HTML img srcset for responsive images
#15When I saw the last line in the doc linked above, I realized that is probably optimized for adding one (1) "retina" image for iPhones and other high-DPI devices.
Re: First draft of HTML img srcset for responsive images
#16The browser should send the density of the screen in ppi (calculated by the screen resolution and the screen information provided by the OS) together with all the other standard stuff like OS, screen resolution, etc.
With this information the server can decide which images to send.
Re: First draft of HTML img srcset for responsive images
#17Earlier quoted context omitted.
Querying the pixel density of the device is not the same as describing the pixel density of the resource. This has been a common misconception in the discussion of this feature.
Apologies - I misunderstood the proposal. However, what is the pixel density of a PNG?
http://www.libpng.org/pub/png/book/chapter11.html#png.ch11.d...
Re: First draft of HTML img srcset for responsive images
#18I like the concept, but the syntax feels awkward, clunky and very specific. Why not repurpose the media attribute from style tags to all other tags?
Yeah, stuff like "2x 100w" looks a bit like magic numbers[1]
Also there's potential for confusion in 'x' - does it mean X as in a co-ordinate i.e. width, or zoom? I'd rather see something more verbose like this:
Yes it's more wordy to write, but you read code more than you write it so it makes sense to optimise for readability over byte-shaving.Re: First draft of HTML img srcset for responsive images
#19Better than this specification hassle is this solution: The browser should send the density of the screen in ppi (calculated by the screen resolution and the screen information provided by the OS) together with all the other standard stuff like OS, screen resolution, etc. With this information the server can decide which images to send.
It breaks caching completely.
It requires scripting just to serve an image.
The same url can have different data - imagine if you resume downloading a file, only to suddenly have a different file.
Re: First draft of HTML img srcset for responsive images
#20Previous discussion about this by developers (170+ comments) who have been discussing Responsive Images in a W3C Community Group - http://www.w3.org/community/respimg/2012/05/11/respimg-propo...